lkml.org 
[lkml]   [2013]   [May]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCHv2 3/3] gpio: msm: Add device tree and irqdomain support for gpio-msm-v2
From
On Thu, May 23, 2013 at 3:29 AM, Rohit Vaswani <rvaswani@codeaurora.org> wrote:
> This cleans up the gpio-msm-v2 driver of all the global define usage.
> The number of gpios are now defined in the device tree. This enables
> adding irqdomain support as well.

Besides the other comments, I have one important here.

> -static int __init msm_gpio_init(void)
> -{
> - int rc;
> -
> - rc = platform_driver_register(&msm_gpio_driver);
> - if (!rc) {
> - rc = platform_device_register(&msm_device_gpio);
> - if (rc)
> - platform_driver_unregister(&msm_gpio_driver);
> - }
> -
> - return rc;
> -}
> -
> -static void __exit msm_gpio_exit(void)
> -{
> - platform_device_unregister(&msm_device_gpio);
> - platform_driver_unregister(&msm_gpio_driver);
> -}
> -
> -postcore_initcall(msm_gpio_init);
> -module_exit(msm_gpio_exit);
> +module_platform_driver(msm_gpio_driver)

It's a really big mistake to do this.
GPIO nowadays is used in many hardware subsystems to support early
stages of booting and initializing.

postcore_initcall is early enough to support mostly anything that
hardware wants from GPIO (for example, ACPI events, though it seems
not a case here).

Please, do not do such changes without good argumets.

--
With Best Regards,
Andy Shevchenko


\
 
 \ /
  Last update: 2013-05-31 22:41    [W:0.115 / U:1.276 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site