Re: [PATCH] hub: make compile without CONFIG_PM

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

 



On Tue, 11 Feb 2014 oliver@xxxxxxxxxx wrote:

> From: Oliver Neukum <oneukum@xxxxxxx>
> 
> Define usb_lock_port and usb_unlock_port in all cases
> 
> Signed-off-by: Oliver Neukum <oneukum@xxxxxxx>
> ---
>  drivers/usb/core/hub.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
> index 28d1218..68d077e 100644
> --- a/drivers/usb/core/hub.c
> +++ b/drivers/usb/core/hub.c
> @@ -3849,6 +3849,8 @@ EXPORT_SYMBOL_GPL(usb_unlocked_enable_lpm);
>  #define hub_suspend		NULL
>  #define hub_resume		NULL
>  #define hub_reset_resume	NULL
> +#define usb_lock_port		NULL
> +#define usb_unlock_port		NULL

You're not serious, are you?  What do you think the compiler will do 
with a line like:

	usb_lock_port(port);

?

Besides, we want port locking to work even when CONFIG_PM isn't 
enabled, because it provides mutual exclusion between khubd and port 
resets.

It would be much better simply to move these routines into hub.h (and 
make them inlines).  That way they will be available to port.c, if they 
ever are needed.

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