Re: [PATCH] usb: typec: Ensure USB_ROLE_SWITCH is a dependency for tps6598x

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 20/05/2020 11:35, Heikki Krogerus wrote:
On Wed, May 20, 2020 at 11:05:26AM +0100, Bryan O'Donoghue wrote:
When I switched on USB role switching for the tps6598x I completely forgot
to add the Kconfig dependency.

This patch ensures the dependency is there to prevent compilation error
when role-switching is off.

There are stubs for the those functions, so there should not be any
compilation errors.


That's what I initially thought too, then I saw this.

git show da4b5d18dd949abdda7c8ea76c9483b5edd49616

but looking at role.h

#if IS_ENABLED(CONFIG_USB_ROLE_SWITCH)

int usb_role_switch_set_role(struct usb_role_switch *sw, enum usb_role role);

#else

static inline int usb_role_switch_set_role(struct usb_role_switch *sw,
                enum usb_role role)
{
        return 0;
}

#endif

That should work.

Hmm, let me see if I can figure this out...



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux