Re: [PATCH v6 4/8] usb: core: add power sequence handling for USB devices

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

 



On Tue, 23 Aug 2016, Peter Chen wrote:

> I will add #ifdef CONFIG_OF for related code. And put the content at
> hub_pwrseq_on at hub_probe directly, how about below?
> 
> hub_probe() {
> 
> 	...
> 
> 	if (hub_configure(hub, endpoint) >= 0) {
> #ifdef CONFIG_OF
> 		for_each_child_of_node(parent->of_node, np) {
> 			ret = generic_pwrseq_on(np, hub);
> 			if (ret)
> 				return ret;
> 		}
> #else
> 		return 0;
> #endif
> 	}

Please make this a separate subroutine like you had before, but now in 
hub.c:

#ifdef CONFIG_OF
static int hub_of_pwrseq_on(struct usb_hub *hub)
{
...
}

#else
static inline int hub_of_pwrseq_on(struct usb_hub *hub)
{
	return 0;
}
#endif /* CONFIG_OF */


Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



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

  Powered by Linux