Re: [PATCH 086/142] USB: otg: fix twl4030-usb build

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

 



2009/9/23 Greg Kroah-Hartman <gregkh@xxxxxxx>:
> From: Randy Dunlap <randy.dunlap@xxxxxxxxxx>
>
> subsys_initcall_sync() is only defined for built-in code, not for
> loadable modules, so this driver build fails when built as a module.
> However, the _sync() forms of the initcalls are not implemented,
> so this should not be used -- just use the non-sync form of it.

Since we need to call twl4030_usb_init after twl4030-regulator
initialization is finished if it is built into kernel, it is better and easy to
use _sync() to fix the problem.

I don't know why _initcall_sync() are not implemented if MODULE
is enabled.

Thanks.

>
> drivers/usb/otg/twl4030-usb.c:777: warning: data definition has no type or storage class
> drivers/usb/otg/twl4030-usb.c:777: warning: type defaults to 'int' in declaration of 'subsys_initcall_sync'
> drivers/usb/otg/twl4030-usb.c:777: warning: parameter names (without types) in function declaration
>
> Signed-off-by: Randy Dunlap <randy.dunlap@xxxxxxxxxx>
> Cc: Felipe Balbi <felipe.balbi@xxxxxxxxx>
> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>
> ---
>  drivers/usb/otg/twl4030-usb.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/usb/otg/twl4030-usb.c b/drivers/usb/otg/twl4030-usb.c
> index d1852d4..9e3e7a5 100644
> --- a/drivers/usb/otg/twl4030-usb.c
> +++ b/drivers/usb/otg/twl4030-usb.c
> @@ -774,7 +774,7 @@ static int __init twl4030_usb_init(void)
>  {
>        return platform_driver_register(&twl4030_usb_driver);
>  }
> -subsys_initcall_sync(twl4030_usb_init);
> +subsys_initcall(twl4030_usb_init);
>
>  static void __exit twl4030_usb_exit(void)
>  {
> --
> 1.6.4.2


-- 
Lei Ming
--
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