aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-04-01 19:28:19 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-04-01 19:28:19 -0400
commit158e0d3621683ee0cdfeeba56f0e5ddd97ae984f (patch)
treecc59e84001f0a496a681242a875ecad6463aa50e /drivers/base
parent675c354a95d5375153b8bb80a0448cab916c7991 (diff)
parent72099304eeb316c4b00df3ae83efe4375729bd78 (diff)
Merge tag 'driver-core-3.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
Pull driver core and sysfs updates from Greg KH: "Here's the big driver core / sysfs update for 3.15-rc1. Lots of kernfs updates to make it useful for other subsystems, and a few other tiny driver core patches. All have been in linux-next for a while" * tag 'driver-core-3.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (42 commits) Revert "sysfs, driver-core: remove unused {sysfs|device}_schedule_callback_owner()" kernfs: cache atomic_write_len in kernfs_open_file numa: fix NULL pointer access and memory leak in unregister_one_node() Revert "driver core: synchronize device shutdown" kernfs: fix off by one error. kernfs: remove duplicate dir.c at the top dir x86: align x86 arch with generic CPU modalias handling cpu: add generic support for CPU feature based module autoloading sysfs: create bin_attributes under the requested group driver core: unexport static function create_syslog_header firmware: use power efficient workqueue for unloading and aborting fw load firmware: give a protection when map page failed firmware: google memconsole driver fixes firmware: fix google/gsmi duplicate efivars_sysfs_init() drivers/base: delete non-required instances of include <linux/init.h> kernfs: fix kernfs_node_from_dentry() ACPI / platform: drop redundant ACPI_HANDLE check kernfs: fix hash calculation in kernfs_rename_ns() kernfs: add CONFIG_KERNFS sysfs, kobject: add sysfs wrapper for kernfs_enable_ns() ...
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/Kconfig3
-rw-r--r--drivers/base/attribute_container.c1
-rw-r--r--drivers/base/core.c20
-rw-r--r--drivers/base/cpu.c46
-rw-r--r--drivers/base/dma-buf.c18
-rw-r--r--drivers/base/firmware_class.c13
-rw-r--r--drivers/base/node.c4
-rw-r--r--drivers/base/platform.c11
-rw-r--r--drivers/base/power/clock_ops.c1
-rw-r--r--drivers/base/power/common.c1
-rw-r--r--drivers/base/power/domain.c1
-rw-r--r--drivers/base/power/domain_governor.c1
-rw-r--r--drivers/base/power/opp.c1
-rw-r--r--drivers/base/regmap/regmap-i2c.c1
-rw-r--r--drivers/base/regmap/regmap-mmio.c1
-rw-r--r--drivers/base/regmap/regmap-spi.c1
-rw-r--r--drivers/base/topology.c1
17 files changed, 89 insertions, 36 deletions
diff --git a/drivers/base/Kconfig b/drivers/base/Kconfig
index ec36e7772e57..8fa8deab6449 100644
--- a/drivers/base/Kconfig
+++ b/drivers/base/Kconfig
@@ -185,6 +185,9 @@ config GENERIC_CPU_DEVICES
185 bool 185 bool
186 default n 186 default n
187 187
188config GENERIC_CPU_AUTOPROBE
189 bool
190
188config SOC_BUS 191config SOC_BUS
189 bool 192 bool
190 193
diff --git a/drivers/base/attribute_container.c b/drivers/base/attribute_container.c
index ecc1929d7f6a..b84ca8f13f9e 100644
--- a/drivers/base/attribute_container.c
+++ b/drivers/base/attribute_container.c
@@ -12,7 +12,6 @@
12 */ 12 */
13 13
14#include <linux/attribute_container.h> 14#include <linux/attribute_container.h>
15#include <linux/init.h>
16#include <linux/device.h> 15#include <linux/device.h>
17#include <linux/kernel.h> 16#include <linux/kernel.h>
18#include <linux/slab.h> 17#include <linux/slab.h>
diff --git a/drivers/base/core.c b/drivers/base/core.c
index 2b567177ef78..0dd65281cc65 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -23,7 +23,6 @@
23#include <linux/genhd.h> 23#include <linux/genhd.h>
24#include <linux/kallsyms.h> 24#include <linux/kallsyms.h>
25#include <linux/mutex.h> 25#include <linux/mutex.h>
26#include <linux/async.h>
27#include <linux/pm_runtime.h> 26#include <linux/pm_runtime.h>
28#include <linux/netdevice.h> 27#include <linux/netdevice.h>
29#include <linux/sysfs.h> 28#include <linux/sysfs.h>
@@ -571,6 +570,23 @@ void device_remove_file(struct device *dev,
571EXPORT_SYMBOL_GPL(device_remove_file); 570EXPORT_SYMBOL_GPL(device_remove_file);
572 571
573/** 572/**
573 * device_remove_file_self - remove sysfs attribute file from its own method.
574 * @dev: device.
575 * @attr: device attribute descriptor.
576 *
577 * See kernfs_remove_self() for details.
578 */
579bool device_remove_file_self(struct device *dev,
580 const struct device_attribute *attr)
581{
582 if (dev)
583 return sysfs_remove_file_self(&dev->kobj, &attr->attr);
584 else
585 return false;
586}
587EXPORT_SYMBOL_GPL(device_remove_file_self);
588
589/**
574 * device_create_bin_file - create sysfs binary attribute file for device. 590 * device_create_bin_file - create sysfs binary attribute file for device.
575 * @dev: device. 591 * @dev: device.
576 * @attr: device binary attribute descriptor. 592 * @attr: device binary attribute descriptor.
@@ -2003,7 +2019,6 @@ void device_shutdown(void)
2003 spin_lock(&devices_kset->list_lock); 2019 spin_lock(&devices_kset->list_lock);
2004 } 2020 }
2005 spin_unlock(&devices_kset->list_lock); 2021 spin_unlock(&devices_kset->list_lock);
2006 async_synchronize_full();
2007} 2022}
2008 2023
2009/* 2024/*
@@ -2058,7 +2073,6 @@ create_syslog_header(const struct device *dev, char *hdr, size_t hdrlen)
2058 2073
2059 return pos; 2074 return pos;
2060} 2075}
2061EXPORT_SYMBOL(create_syslog_header);
2062 2076
2063int dev_vprintk_emit(int level, const struct device *dev, 2077int dev_vprintk_emit(int level, const struct device *dev,
2064 const char *fmt, va_list args) 2078 const char *fmt, va_list args)
diff --git a/drivers/base/cpu.c b/drivers/base/cpu.c
index f48370dfc908..006b1bc5297d 100644
--- a/drivers/base/cpu.c
+++ b/drivers/base/cpu.c
@@ -15,6 +15,7 @@
15#include <linux/percpu.h> 15#include <linux/percpu.h>
16#include <linux/acpi.h> 16#include <linux/acpi.h>
17#include <linux/of.h> 17#include <linux/of.h>
18#include <linux/cpufeature.h>
18 19
19#include "base.h" 20#include "base.h"
20 21
@@ -286,6 +287,41 @@ static void cpu_device_release(struct device *dev)
286 */ 287 */
287} 288}
288 289
290#ifdef CONFIG_GENERIC_CPU_AUTOPROBE
291static ssize_t print_cpu_modalias(struct device *dev,
292 struct device_attribute *attr,
293 char *buf)
294{
295 ssize_t n;
296 u32 i;
297
298 n = sprintf(buf, "cpu:type:" CPU_FEATURE_TYPEFMT ":feature:",
299 CPU_FEATURE_TYPEVAL);
300
301 for (i = 0; i < MAX_CPU_FEATURES; i++)
302 if (cpu_have_feature(i)) {
303 if (PAGE_SIZE < n + sizeof(",XXXX\n")) {
304 WARN(1, "CPU features overflow page\n");
305 break;
306 }
307 n += sprintf(&buf[n], ",%04X", i);
308 }
309 buf[n++] = '\n';
310 return n;
311}
312
313static int cpu_uevent(struct device *dev, struct kobj_uevent_env *env)
314{
315 char *buf = kzalloc(PAGE_SIZE, GFP_KERNEL);
316 if (buf) {
317 print_cpu_modalias(NULL, NULL, buf);
318 add_uevent_var(env, "MODALIAS=%s", buf);
319 kfree(buf);
320 }
321 return 0;
322}
323#endif
324
289/* 325/*
290 * register_cpu - Setup a sysfs device for a CPU. 326 * register_cpu - Setup a sysfs device for a CPU.
291 * @cpu - cpu->hotpluggable field set to 1 will generate a control file in 327 * @cpu - cpu->hotpluggable field set to 1 will generate a control file in
@@ -306,8 +342,8 @@ int register_cpu(struct cpu *cpu, int num)
306 cpu->dev.offline_disabled = !cpu->hotpluggable; 342 cpu->dev.offline_disabled = !cpu->hotpluggable;
307 cpu->dev.offline = !cpu_online(num); 343 cpu->dev.offline = !cpu_online(num);
308 cpu->dev.of_node = of_get_cpu_node(num, NULL); 344 cpu->dev.of_node = of_get_cpu_node(num, NULL);
309#ifdef CONFIG_ARCH_HAS_CPU_AUTOPROBE 345#ifdef CONFIG_GENERIC_CPU_AUTOPROBE
310 cpu->dev.bus->uevent = arch_cpu_uevent; 346 cpu->dev.bus->uevent = cpu_uevent;
311#endif 347#endif
312 cpu->dev.groups = common_cpu_attr_groups; 348 cpu->dev.groups = common_cpu_attr_groups;
313 if (cpu->hotpluggable) 349 if (cpu->hotpluggable)
@@ -330,8 +366,8 @@ struct device *get_cpu_device(unsigned cpu)
330} 366}
331EXPORT_SYMBOL_GPL(get_cpu_device); 367EXPORT_SYMBOL_GPL(get_cpu_device);
332 368
333#ifdef CONFIG_ARCH_HAS_CPU_AUTOPROBE 369#ifdef CONFIG_GENERIC_CPU_AUTOPROBE
334static DEVICE_ATTR(modalias, 0444, arch_print_cpu_modalias, NULL); 370static DEVICE_ATTR(modalias, 0444, print_cpu_modalias, NULL);
335#endif 371#endif
336 372
337static struct attribute *cpu_root_attrs[] = { 373static struct attribute *cpu_root_attrs[] = {
@@ -344,7 +380,7 @@ static struct attribute *cpu_root_attrs[] = {
344 &cpu_attrs[2].attr.attr, 380 &cpu_attrs[2].attr.attr,
345 &dev_attr_kernel_max.attr, 381 &dev_attr_kernel_max.attr,
346 &dev_attr_offline.attr, 382 &dev_attr_offline.attr,
347#ifdef CONFIG_ARCH_HAS_CPU_AUTOPROBE 383#ifdef CONFIG_GENERIC_CPU_AUTOPROBE
348 &dev_attr_modalias.attr, 384 &dev_attr_modalias.attr,
349#endif 385#endif
350 NULL 386 NULL
diff --git a/drivers/base/dma-buf.c b/drivers/base/dma-buf.c
index 61d6d62cc0d3..ea77701deda4 100644
--- a/drivers/base/dma-buf.c
+++ b/drivers/base/dma-buf.c
@@ -251,9 +251,8 @@ EXPORT_SYMBOL_GPL(dma_buf_put);
251 * @dmabuf: [in] buffer to attach device to. 251 * @dmabuf: [in] buffer to attach device to.
252 * @dev: [in] device to be attached. 252 * @dev: [in] device to be attached.
253 * 253 *
254 * Returns struct dma_buf_attachment * for this attachment; may return negative 254 * Returns struct dma_buf_attachment * for this attachment; returns ERR_PTR on
255 * error codes. 255 * error.
256 *
257 */ 256 */
258struct dma_buf_attachment *dma_buf_attach(struct dma_buf *dmabuf, 257struct dma_buf_attachment *dma_buf_attach(struct dma_buf *dmabuf,
259 struct device *dev) 258 struct device *dev)
@@ -319,9 +318,8 @@ EXPORT_SYMBOL_GPL(dma_buf_detach);
319 * @attach: [in] attachment whose scatterlist is to be returned 318 * @attach: [in] attachment whose scatterlist is to be returned
320 * @direction: [in] direction of DMA transfer 319 * @direction: [in] direction of DMA transfer
321 * 320 *
322 * Returns sg_table containing the scatterlist to be returned; may return NULL 321 * Returns sg_table containing the scatterlist to be returned; returns ERR_PTR
323 * or ERR_PTR. 322 * on error.
324 *
325 */ 323 */
326struct sg_table *dma_buf_map_attachment(struct dma_buf_attachment *attach, 324struct sg_table *dma_buf_map_attachment(struct dma_buf_attachment *attach,
327 enum dma_data_direction direction) 325 enum dma_data_direction direction)
@@ -334,6 +332,8 @@ struct sg_table *dma_buf_map_attachment(struct dma_buf_attachment *attach,
334 return ERR_PTR(-EINVAL); 332 return ERR_PTR(-EINVAL);
335 333
336 sg_table = attach->dmabuf->ops->map_dma_buf(attach, direction); 334 sg_table = attach->dmabuf->ops->map_dma_buf(attach, direction);
335 if (!sg_table)
336 sg_table = ERR_PTR(-ENOMEM);
337 337
338 return sg_table; 338 return sg_table;
339} 339}
@@ -544,6 +544,8 @@ EXPORT_SYMBOL_GPL(dma_buf_mmap);
544 * These calls are optional in drivers. The intended use for them 544 * These calls are optional in drivers. The intended use for them
545 * is for mapping objects linear in kernel space for high use objects. 545 * is for mapping objects linear in kernel space for high use objects.
546 * Please attempt to use kmap/kunmap before thinking about these interfaces. 546 * Please attempt to use kmap/kunmap before thinking about these interfaces.
547 *
548 * Returns NULL on error.
547 */ 549 */
548void *dma_buf_vmap(struct dma_buf *dmabuf) 550void *dma_buf_vmap(struct dma_buf *dmabuf)
549{ 551{
@@ -566,7 +568,9 @@ void *dma_buf_vmap(struct dma_buf *dmabuf)
566 BUG_ON(dmabuf->vmap_ptr); 568 BUG_ON(dmabuf->vmap_ptr);
567 569
568 ptr = dmabuf->ops->vmap(dmabuf); 570 ptr = dmabuf->ops->vmap(dmabuf);
569 if (IS_ERR_OR_NULL(ptr)) 571 if (WARN_ON_ONCE(IS_ERR(ptr)))
572 ptr = NULL;
573 if (!ptr)
570 goto out_unlock; 574 goto out_unlock;
571 575
572 dmabuf->vmap_ptr = ptr; 576 dmabuf->vmap_ptr = ptr;
diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
index c30df50e4440..d276e33880be 100644
--- a/drivers/base/firmware_class.c
+++ b/drivers/base/firmware_class.c
@@ -649,7 +649,9 @@ static ssize_t firmware_loading_store(struct device *dev,
649 * see the mapped 'buf->data' once the loading 649 * see the mapped 'buf->data' once the loading
650 * is completed. 650 * is completed.
651 * */ 651 * */
652 fw_map_pages_buf(fw_buf); 652 if (fw_map_pages_buf(fw_buf))
653 dev_err(dev, "%s: map pages failed\n",
654 __func__);
653 list_del_init(&fw_buf->pending_list); 655 list_del_init(&fw_buf->pending_list);
654 complete_all(&fw_buf->completion); 656 complete_all(&fw_buf->completion);
655 break; 657 break;
@@ -900,7 +902,8 @@ static int _request_firmware_load(struct firmware_priv *fw_priv,
900 dev_set_uevent_suppress(f_dev, false); 902 dev_set_uevent_suppress(f_dev, false);
901 dev_dbg(f_dev, "firmware: requesting %s\n", buf->fw_id); 903 dev_dbg(f_dev, "firmware: requesting %s\n", buf->fw_id);
902 if (timeout != MAX_SCHEDULE_TIMEOUT) 904 if (timeout != MAX_SCHEDULE_TIMEOUT)
903 schedule_delayed_work(&fw_priv->timeout_work, timeout); 905 queue_delayed_work(system_power_efficient_wq,
906 &fw_priv->timeout_work, timeout);
904 907
905 kobject_uevent(&fw_priv->dev.kobj, KOBJ_ADD); 908 kobject_uevent(&fw_priv->dev.kobj, KOBJ_ADD);
906 } 909 }
@@ -908,6 +911,8 @@ static int _request_firmware_load(struct firmware_priv *fw_priv,
908 wait_for_completion(&buf->completion); 911 wait_for_completion(&buf->completion);
909 912
910 cancel_delayed_work_sync(&fw_priv->timeout_work); 913 cancel_delayed_work_sync(&fw_priv->timeout_work);
914 if (!buf->data)
915 retval = -ENOMEM;
911 916
912 device_remove_file(f_dev, &dev_attr_loading); 917 device_remove_file(f_dev, &dev_attr_loading);
913err_del_bin_attr: 918err_del_bin_attr:
@@ -1570,8 +1575,8 @@ static void device_uncache_fw_images_work(struct work_struct *work)
1570 */ 1575 */
1571static void device_uncache_fw_images_delay(unsigned long delay) 1576static void device_uncache_fw_images_delay(unsigned long delay)
1572{ 1577{
1573 schedule_delayed_work(&fw_cache.work, 1578 queue_delayed_work(system_power_efficient_wq, &fw_cache.work,
1574 msecs_to_jiffies(delay)); 1579 msecs_to_jiffies(delay));
1575} 1580}
1576 1581
1577static int fw_pm_notify(struct notifier_block *notify_block, 1582static int fw_pm_notify(struct notifier_block *notify_block,
diff --git a/drivers/base/node.c b/drivers/base/node.c
index bc9f43bf7e29..8f7ed9933a7c 100644
--- a/drivers/base/node.c
+++ b/drivers/base/node.c
@@ -599,7 +599,11 @@ int register_one_node(int nid)
599 599
600void unregister_one_node(int nid) 600void unregister_one_node(int nid)
601{ 601{
602 if (!node_devices[nid])
603 return;
604
602 unregister_node(node_devices[nid]); 605 unregister_node(node_devices[nid]);
606 kfree(node_devices[nid]);
603 node_devices[nid] = NULL; 607 node_devices[nid] = NULL;
604} 608}
605 609
diff --git a/drivers/base/platform.c b/drivers/base/platform.c
index bc78848dd59a..e714709704e4 100644
--- a/drivers/base/platform.c
+++ b/drivers/base/platform.c
@@ -481,11 +481,10 @@ static int platform_drv_probe(struct device *_dev)
481 struct platform_device *dev = to_platform_device(_dev); 481 struct platform_device *dev = to_platform_device(_dev);
482 int ret; 482 int ret;
483 483
484 if (ACPI_HANDLE(_dev)) 484 acpi_dev_pm_attach(_dev, true);
485 acpi_dev_pm_attach(_dev, true);
486 485
487 ret = drv->probe(dev); 486 ret = drv->probe(dev);
488 if (ret && ACPI_HANDLE(_dev)) 487 if (ret)
489 acpi_dev_pm_detach(_dev, true); 488 acpi_dev_pm_detach(_dev, true);
490 489
491 if (drv->prevent_deferred_probe && ret == -EPROBE_DEFER) { 490 if (drv->prevent_deferred_probe && ret == -EPROBE_DEFER) {
@@ -508,8 +507,7 @@ static int platform_drv_remove(struct device *_dev)
508 int ret; 507 int ret;
509 508
510 ret = drv->remove(dev); 509 ret = drv->remove(dev);
511 if (ACPI_HANDLE(_dev)) 510 acpi_dev_pm_detach(_dev, true);
512 acpi_dev_pm_detach(_dev, true);
513 511
514 return ret; 512 return ret;
515} 513}
@@ -520,8 +518,7 @@ static void platform_drv_shutdown(struct device *_dev)
520 struct platform_device *dev = to_platform_device(_dev); 518 struct platform_device *dev = to_platform_device(_dev);
521 519
522 drv->shutdown(dev); 520 drv->shutdown(dev);
523 if (ACPI_HANDLE(_dev)) 521 acpi_dev_pm_detach(_dev, true);
524 acpi_dev_pm_detach(_dev, true);
525} 522}
526 523
527/** 524/**
diff --git a/drivers/base/power/clock_ops.c b/drivers/base/power/clock_ops.c
index e870bbe9ec4e..b99e6c06ee67 100644
--- a/drivers/base/power/clock_ops.c
+++ b/drivers/base/power/clock_ops.c
@@ -6,7 +6,6 @@
6 * This file is released under the GPLv2. 6 * This file is released under the GPLv2.
7 */ 7 */
8 8
9#include <linux/init.h>
10#include <linux/kernel.h> 9#include <linux/kernel.h>
11#include <linux/device.h> 10#include <linux/device.h>
12#include <linux/io.h> 11#include <linux/io.h>
diff --git a/drivers/base/power/common.c b/drivers/base/power/common.c
index 5da914041305..df2e5eeaeb05 100644
--- a/drivers/base/power/common.c
+++ b/drivers/base/power/common.c
@@ -6,7 +6,6 @@
6 * This file is released under the GPLv2. 6 * This file is released under the GPLv2.
7 */ 7 */
8 8
9#include <linux/init.h>
10#include <linux/kernel.h> 9#include <linux/kernel.h>
11#include <linux/device.h> 10#include <linux/device.h>
12#include <linux/export.h> 11#include <linux/export.h>
diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
index dc127e5dec4b..6f54962aae1d 100644
--- a/drivers/base/power/domain.c
+++ b/drivers/base/power/domain.c
@@ -6,7 +6,6 @@
6 * This file is released under the GPLv2. 6 * This file is released under the GPLv2.
7 */ 7 */
8 8
9#include <linux/init.h>
10#include <linux/kernel.h> 9#include <linux/kernel.h>
11#include <linux/io.h> 10#include <linux/io.h>
12#include <linux/pm_runtime.h> 11#include <linux/pm_runtime.h>
diff --git a/drivers/base/power/domain_governor.c b/drivers/base/power/domain_governor.c
index 28dee3053f1f..a089e3bcdfbc 100644
--- a/drivers/base/power/domain_governor.c
+++ b/drivers/base/power/domain_governor.c
@@ -6,7 +6,6 @@
6 * This file is released under the GPLv2. 6 * This file is released under the GPLv2.
7 */ 7 */
8 8
9#include <linux/init.h>
10#include <linux/kernel.h> 9#include <linux/kernel.h>
11#include <linux/pm_domain.h> 10#include <linux/pm_domain.h>
12#include <linux/pm_qos.h> 11#include <linux/pm_qos.h>
diff --git a/drivers/base/power/opp.c b/drivers/base/power/opp.c
index fa4187418440..25538675d59e 100644
--- a/drivers/base/power/opp.c
+++ b/drivers/base/power/opp.c
@@ -14,7 +14,6 @@
14#include <linux/kernel.h> 14#include <linux/kernel.h>
15#include <linux/errno.h> 15#include <linux/errno.h>
16#include <linux/err.h> 16#include <linux/err.h>
17#include <linux/init.h>
18#include <linux/slab.h> 17#include <linux/slab.h>
19#include <linux/cpufreq.h> 18#include <linux/cpufreq.h>
20#include <linux/device.h> 19#include <linux/device.h>
diff --git a/drivers/base/regmap/regmap-i2c.c b/drivers/base/regmap/regmap-i2c.c
index fa6bf5279d28..ebd189529760 100644
--- a/drivers/base/regmap/regmap-i2c.c
+++ b/drivers/base/regmap/regmap-i2c.c
@@ -13,7 +13,6 @@
13#include <linux/regmap.h> 13#include <linux/regmap.h>
14#include <linux/i2c.h> 14#include <linux/i2c.h>
15#include <linux/module.h> 15#include <linux/module.h>
16#include <linux/init.h>
17 16
18static int regmap_i2c_write(void *context, const void *data, size_t count) 17static int regmap_i2c_write(void *context, const void *data, size_t count)
19{ 18{
diff --git a/drivers/base/regmap/regmap-mmio.c b/drivers/base/regmap/regmap-mmio.c
index de45a1e1548f..1e03e7f8bacb 100644
--- a/drivers/base/regmap/regmap-mmio.c
+++ b/drivers/base/regmap/regmap-mmio.c
@@ -18,7 +18,6 @@
18 18
19#include <linux/clk.h> 19#include <linux/clk.h>
20#include <linux/err.h> 20#include <linux/err.h>
21#include <linux/init.h>
22#include <linux/io.h> 21#include <linux/io.h>
23#include <linux/module.h> 22#include <linux/module.h>
24#include <linux/regmap.h> 23#include <linux/regmap.h>
diff --git a/drivers/base/regmap/regmap-spi.c b/drivers/base/regmap/regmap-spi.c
index 37f12ae7aada..0eb3097c0d76 100644
--- a/drivers/base/regmap/regmap-spi.c
+++ b/drivers/base/regmap/regmap-spi.c
@@ -12,7 +12,6 @@
12 12
13#include <linux/regmap.h> 13#include <linux/regmap.h>
14#include <linux/spi/spi.h> 14#include <linux/spi/spi.h>
15#include <linux/init.h>
16#include <linux/module.h> 15#include <linux/module.h>
17 16
18#include "internal.h" 17#include "internal.h"
diff --git a/drivers/base/topology.c b/drivers/base/topology.c
index 94ffee378f10..ad9d17762664 100644
--- a/drivers/base/topology.c
+++ b/drivers/base/topology.c
@@ -23,7 +23,6 @@
23 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 23 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 * 24 *
25 */ 25 */
26#include <linux/init.h>
27#include <linux/mm.h> 26#include <linux/mm.h>
28#include <linux/cpu.h> 27#include <linux/cpu.h>
29#include <linux/module.h> 28#include <linux/module.h>