summaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-htc-egpio.c
diff options
context:
space:
mode:
authorPaul Gortmaker <paul.gortmaker@windriver.com>2016-10-31 14:27:07 -0400
committerLinus Walleij <linus.walleij@linaro.org>2016-11-04 18:02:48 -0400
commit43bbf94c333ac1b1bee2bf05efb48e9ae8ea3e82 (patch)
tree8001dbfa6a09db9f554419d143b45eec373440ac /drivers/gpio/gpio-htc-egpio.c
parent09e258af4edaa10ee9aa3164923ee07d5863d637 (diff)
gpio: htc-egpio: Make it explicitly non-modular
The Kconfig currently controlling compilation of this code is: drivers/gpio/Kconfig:config HTC_EGPIO drivers/gpio/Kconfig: bool "HTC EGPIO support" ...meaning that it currently is not being built as a module by anyone. Lets remove the modular code that is essentially orphaned, so that when reading the driver there is no doubt it is builtin-only. We explicitly disallow a driver unbind, since that doesn't have a sensible use case anyway, and it allows us to drop the ".remove" code for non-modular drivers. Since module_init was not in use by this code, the init ordering remains unchanged with this commit. We also delete the MODULE_LICENSE tag etc. since all that information is already contained at the top of the file in the comments. Cc: Linus Walleij <linus.walleij@linaro.org> Cc: Alexandre Courbot <gnurou@gmail.com> Cc: Kevin O'Connor <kevin@koconnor.net> Cc: linux-gpio@vger.kernel.org Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpio-htc-egpio.c')
-rw-r--r--drivers/gpio/gpio-htc-egpio.c32
1 files changed, 2 insertions, 30 deletions
diff --git a/drivers/gpio/gpio-htc-egpio.c b/drivers/gpio/gpio-htc-egpio.c
index 0b4df6051097..5ab895b41819 100644
--- a/drivers/gpio/gpio-htc-egpio.c
+++ b/drivers/gpio/gpio-htc-egpio.c
@@ -17,7 +17,7 @@
17#include <linux/platform_data/gpio-htc-egpio.h> 17#include <linux/platform_data/gpio-htc-egpio.h>
18#include <linux/platform_device.h> 18#include <linux/platform_device.h>
19#include <linux/slab.h> 19#include <linux/slab.h>
20#include <linux/module.h> 20#include <linux/init.h>
21 21
22struct egpio_chip { 22struct egpio_chip {
23 int reg_start; 23 int reg_start;
@@ -367,24 +367,6 @@ fail:
367 return ret; 367 return ret;
368} 368}
369 369
370static int __exit egpio_remove(struct platform_device *pdev)
371{
372 struct egpio_info *ei = platform_get_drvdata(pdev);
373 unsigned int irq, irq_end;
374
375 if (ei->chained_irq) {
376 irq_end = ei->irq_start + ei->nirqs;
377 for (irq = ei->irq_start; irq < irq_end; irq++) {
378 irq_set_chip_and_handler(irq, NULL, NULL);
379 irq_set_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
380 }
381 irq_set_chained_handler(ei->chained_irq, NULL);
382 device_init_wakeup(&pdev->dev, 0);
383 }
384
385 return 0;
386}
387
388#ifdef CONFIG_PM 370#ifdef CONFIG_PM
389static int egpio_suspend(struct platform_device *pdev, pm_message_t state) 371static int egpio_suspend(struct platform_device *pdev, pm_message_t state)
390{ 372{
@@ -416,8 +398,8 @@ static int egpio_resume(struct platform_device *pdev)
416static struct platform_driver egpio_driver = { 398static struct platform_driver egpio_driver = {
417 .driver = { 399 .driver = {
418 .name = "htc-egpio", 400 .name = "htc-egpio",
401 .suppress_bind_attrs = true,
419 }, 402 },
420 .remove = __exit_p(egpio_remove),
421 .suspend = egpio_suspend, 403 .suspend = egpio_suspend,
422 .resume = egpio_resume, 404 .resume = egpio_resume,
423}; 405};
@@ -426,15 +408,5 @@ static int __init egpio_init(void)
426{ 408{
427 return platform_driver_probe(&egpio_driver, egpio_probe); 409 return platform_driver_probe(&egpio_driver, egpio_probe);
428} 410}
429
430static void __exit egpio_exit(void)
431{
432 platform_driver_unregister(&egpio_driver);
433}
434
435/* start early for dependencies */ 411/* start early for dependencies */
436subsys_initcall(egpio_init); 412subsys_initcall(egpio_init);
437module_exit(egpio_exit)
438
439MODULE_LICENSE("GPL");
440MODULE_AUTHOR("Kevin O'Connor <kevin@koconnor.net>");