• Stephen Rothwell's avatar
    usb: dwc3: fix up for role switch API change · 0339f7fb
    Stephen Rothwell authored
    After merging the usb-gadget tree, today's linux-next build (arm
    multi_v7_defconfig) failed like this:
    
    drivers/usb/dwc3/drd.c: In function 'dwc3_setup_role_switch':
    drivers/usb/dwc3/drd.c:551:23: error: assignment to 'usb_role_switch_set_t' {aka 'int (*)(struct usb_role_switch *, enum usb_role)'} from incompatible pointer type 'int (*)(struct device *, enum usb_role)' [-Werror=incompatible-pointer-types]
      551 |  dwc3_role_switch.set = dwc3_usb_role_switch_set;
          |                       ^
    drivers/usb/dwc3/drd.c:552:23: error: assignment to 'usb_role_switch_get_t' {aka 'enum usb_role (*)(struct usb_role_switch *)'} from incompatible pointer type 'enum usb_role (*)(struct device *)' [-Werror=incompatible-pointer-types]
      552 |  dwc3_role_switch.get = dwc3_usb_role_switch_get;
          |                       ^
    
    Caused by commit
    
      8a0a1379 ("usb: dwc3: Registering a role switch in the DRD code.")
    
    interacting with commit
    
      bce3052f ("usb: roles: Provide the switch drivers handle to the switch in the API")
    
    from the usb tree.
    Signed-off-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
    Link: https://lore.kernel.org/r/20200316143752.473f1073@canb.auug.org.auSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    0339f7fb
drd.c 16 KB