Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mfd: wm8350-core: Drop unused module infrastructure from non-modular code

The Kconfig currently controlling compilation of this code is:

drivers/mfd/Kconfig:config MFD_WM8350
drivers/mfd/Kconfig: bool

...meaning that it currently is not being built as a module by anyone.

Lets remove the couple traces of modular infrastructure use, so that
when reading the driver there is no doubt it is builtin-only.

We delete the MODULE_LICENSE tag etc. since all that information
is already contained at the top of the file in the comments.

We replace module.h with init.h and export.h ; the latter since the
file does export some symbols.

Previous demodularizaion work has made wm8350_device_exit() no longer
used, so it is also removed from the 8350 core code.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>

authored by

Paul Gortmaker and committed by
Lee Jones
0db88688 fc643066

+2 -29
+2 -28
drivers/mfd/wm8350-core.c
··· 13 13 */ 14 14 15 15 #include <linux/kernel.h> 16 - #include <linux/module.h> 16 + #include <linux/init.h> 17 + #include <linux/export.h> 17 18 #include <linux/slab.h> 18 19 #include <linux/bug.h> 19 20 #include <linux/device.h> ··· 443 442 return ret; 444 443 } 445 444 EXPORT_SYMBOL_GPL(wm8350_device_init); 446 - 447 - void wm8350_device_exit(struct wm8350 *wm8350) 448 - { 449 - int i; 450 - 451 - for (i = 0; i < ARRAY_SIZE(wm8350->pmic.led); i++) 452 - platform_device_unregister(wm8350->pmic.led[i].pdev); 453 - 454 - for (i = 0; i < ARRAY_SIZE(wm8350->pmic.pdev); i++) 455 - platform_device_unregister(wm8350->pmic.pdev[i]); 456 - 457 - platform_device_unregister(wm8350->wdt.pdev); 458 - platform_device_unregister(wm8350->rtc.pdev); 459 - platform_device_unregister(wm8350->power.pdev); 460 - platform_device_unregister(wm8350->hwmon.pdev); 461 - platform_device_unregister(wm8350->gpio.pdev); 462 - platform_device_unregister(wm8350->codec.pdev); 463 - 464 - if (wm8350->irq_base) 465 - free_irq(wm8350->irq_base + WM8350_IRQ_AUXADC_DATARDY, wm8350); 466 - 467 - wm8350_irq_exit(wm8350); 468 - } 469 - EXPORT_SYMBOL_GPL(wm8350_device_exit); 470 - 471 - MODULE_DESCRIPTION("WM8350 AudioPlus PMIC core driver"); 472 - MODULE_LICENSE("GPL");
-1
include/linux/mfd/wm8350/core.h
··· 643 643 */ 644 644 int wm8350_device_init(struct wm8350 *wm8350, int irq, 645 645 struct wm8350_platform_data *pdata); 646 - void wm8350_device_exit(struct wm8350 *wm8350); 647 646 648 647 /* 649 648 * WM8350 device IO