From 3a76e5e09fbb51e756b4e732e3e65446f4984cf5 Mon Sep 17 00:00:00 2001 From: Seth Jennings Date: Mon, 3 Jun 2013 15:33:02 -0500 Subject: debugfs: add get/set for atomic types debugfs currently lack the ability to create attributes that set/get atomic_t values. This patch adds support for this through a new debugfs_create_atomic_t() function. Signed-off-by: Seth Jennings Acked-by: Greg Kroah-Hartman Acked-by: Mel Gorman Acked-by: Rik van Riel Acked-by: Konrad Rzeszutek Wilk Signed-off-by: Greg Kroah-Hartman --- include/linux/debugfs.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/linux/debugfs.h b/include/linux/debugfs.h index 63f2465807d4..d68b4ea7343c 100644 --- a/include/linux/debugfs.h +++ b/include/linux/debugfs.h @@ -79,6 +79,8 @@ struct dentry *debugfs_create_x64(const char *name, umode_t mode, struct dentry *parent, u64 *value); struct dentry *debugfs_create_size_t(const char *name, umode_t mode, struct dentry *parent, size_t *value); +struct dentry *debugfs_create_atomic_t(const char *name, umode_t mode, + struct dentry *parent, atomic_t *value); struct dentry *debugfs_create_bool(const char *name, umode_t mode, struct dentry *parent, u32 *value); -- cgit v1.2.3 From 9447057eaff871dd7c63c808de761b8732407169 Mon Sep 17 00:00:00 2001 From: Libo Chen Date: Sat, 25 May 2013 12:40:50 +0800 Subject: platform_device: use a macro instead of platform_driver_register I found a lot of mistakes using struct platform_driver without owner so I make a macro instead of the function platform_driver_register. It can set owner in it, then guys don`t care about module owner again. Signed-off-by: Libo Chen Signed-off-by: Greg Kroah-Hartman --- include/linux/platform_device.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/linux/platform_device.h b/include/linux/platform_device.h index 9abf1db6aea6..cd46ee58b9dc 100644 --- a/include/linux/platform_device.h +++ b/include/linux/platform_device.h @@ -180,7 +180,13 @@ struct platform_driver { const struct platform_device_id *id_table; }; -extern int platform_driver_register(struct platform_driver *); +/* + * use a macro to avoid include chaining to get THIS_MODULE + */ +#define platform_driver_register(drv) \ + __platform_driver_register(drv, THIS_MODULE) +extern int __platform_driver_register(struct platform_driver *, + struct module *); extern void platform_driver_unregister(struct platform_driver *); /* non-hotpluggable platform devices may use this so that probe() and -- cgit v1.2.3 From 40b313608ad4ea655addd2ec6cdd106477ae8e15 Mon Sep 17 00:00:00 2001 From: Stephen Rothwell Date: Tue, 21 May 2013 13:49:35 +1000 Subject: Finally eradicate CONFIG_HOTPLUG Ever since commit 45f035ab9b8f ("CONFIG_HOTPLUG should be always on"), it has been basically impossible to build a kernel with CONFIG_HOTPLUG turned off. Remove all the remaining references to it. Cc: Russell King Cc: Doug Thompson Cc: Bjorn Helgaas Cc: Steven Whitehouse Cc: Arnd Bergmann Cc: Pavel Machek Cc: "Rafael J. Wysocki" Cc: Andrew Morton Signed-off-by: Stephen Rothwell Acked-by: Mauro Carvalho Chehab Acked-by: Hans Verkuil Signed-off-by: Greg Kroah-Hartman --- include/asm-generic/vmlinux.lds.h | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'include') diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index eb58d2d7d971..4f2737208c42 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h @@ -68,14 +68,6 @@ * are handled as text/data or they can be discarded (which * often happens at runtime) */ -#ifdef CONFIG_HOTPLUG -#define DEV_KEEP(sec) *(.dev##sec) -#define DEV_DISCARD(sec) -#else -#define DEV_KEEP(sec) -#define DEV_DISCARD(sec) *(.dev##sec) -#endif - #ifdef CONFIG_HOTPLUG_CPU #define CPU_KEEP(sec) *(.cpu##sec) #define CPU_DISCARD(sec) @@ -182,8 +174,6 @@ *(.data) \ *(.ref.data) \ *(.data..shared_aligned) /* percpu related */ \ - DEV_KEEP(init.data) \ - DEV_KEEP(exit.data) \ CPU_KEEP(init.data) \ CPU_KEEP(exit.data) \ MEM_KEEP(init.data) \ @@ -372,8 +362,6 @@ /* __*init sections */ \ __init_rodata : AT(ADDR(__init_rodata) - LOAD_OFFSET) { \ *(.ref.rodata) \ - DEV_KEEP(init.rodata) \ - DEV_KEEP(exit.rodata) \ CPU_KEEP(init.rodata) \ CPU_KEEP(exit.rodata) \ MEM_KEEP(init.rodata) \ @@ -416,8 +404,6 @@ *(.text.hot) \ *(.text) \ *(.ref.text) \ - DEV_KEEP(init.text) \ - DEV_KEEP(exit.text) \ CPU_KEEP(init.text) \ CPU_KEEP(exit.text) \ MEM_KEEP(init.text) \ @@ -503,7 +489,6 @@ /* init and exit section handling */ #define INIT_DATA \ *(.init.data) \ - DEV_DISCARD(init.data) \ CPU_DISCARD(init.data) \ MEM_DISCARD(init.data) \ KERNEL_CTORS() \ @@ -511,7 +496,6 @@ *(.init.rodata) \ FTRACE_EVENTS() \ TRACE_SYSCALLS() \ - DEV_DISCARD(init.rodata) \ CPU_DISCARD(init.rodata) \ MEM_DISCARD(init.rodata) \ CLK_OF_TABLES() \ @@ -521,14 +505,11 @@ #define INIT_TEXT \ *(.init.text) \ - DEV_DISCARD(init.text) \ CPU_DISCARD(init.text) \ MEM_DISCARD(init.text) #define EXIT_DATA \ *(.exit.data) \ - DEV_DISCARD(exit.data) \ - DEV_DISCARD(exit.rodata) \ CPU_DISCARD(exit.data) \ CPU_DISCARD(exit.rodata) \ MEM_DISCARD(exit.data) \ @@ -536,7 +517,6 @@ #define EXIT_TEXT \ *(.exit.text) \ - DEV_DISCARD(exit.text) \ CPU_DISCARD(exit.text) \ MEM_DISCARD(exit.text) -- cgit v1.2.3 From 93232e46b209821cb66faf40def928e60615f86b Mon Sep 17 00:00:00 2001 From: Ming Lei Date: Thu, 6 Jun 2013 20:01:47 +0800 Subject: firmware loader: don't export cache_firmware and uncache_firmware Looks no driver has the explict requirement for the two exported API, just don't export them anymore. Signed-off-by: Ming Lei Signed-off-by: Greg Kroah-Hartman --- include/linux/firmware.h | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'include') diff --git a/include/linux/firmware.h b/include/linux/firmware.h index e4279fedb93a..e154c1005cd1 100644 --- a/include/linux/firmware.h +++ b/include/linux/firmware.h @@ -47,8 +47,6 @@ int request_firmware_nowait( void (*cont)(const struct firmware *fw, void *context)); void release_firmware(const struct firmware *fw); -int cache_firmware(const char *name); -int uncache_firmware(const char *name); #else static inline int request_firmware(const struct firmware **fw, const char *name, @@ -68,15 +66,6 @@ static inline void release_firmware(const struct firmware *fw) { } -static inline int cache_firmware(const char *name) -{ - return -ENOENT; -} - -static inline int uncache_firmware(const char *name) -{ - return -EINVAL; -} #endif #endif -- cgit v1.2.3 From bfd63cd24df69120585c22e09fda78723772ee2a Mon Sep 17 00:00:00 2001 From: Michael Opdenacker Date: Wed, 26 Jun 2013 05:57:06 +0200 Subject: driver core: device.h: fix doc compilation warnings This patch fixes the below 3 warnings running "make htmldocs", by adding descriptions for recently added structure members: DOCPROC Documentation/DocBook/device-drivers.xml Warning(/work/git.free-electrons.com/users/michael-opdenacker/linux//include/linux/device.h:116): No description found for parameter 'lock_key' Warning(/work/git.free-electrons.com/users/michael-opdenacker/linux//include/linux/device.h:723): No description found for parameter 'cma_area' Warning(/work/git.free-electrons.com/users/michael-opdenacker/linux//include/linux/device.h:723): No description found for parameter 'iommu_group' Don't hesitate to propose better descriptions! Signed-off-by: Michael Opdenacker Signed-off-by: Greg Kroah-Hartman --- include/linux/device.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/linux/device.h b/include/linux/device.h index c0a126125325..9d4835a8f8b8 100644 --- a/include/linux/device.h +++ b/include/linux/device.h @@ -80,6 +80,7 @@ extern void bus_remove_file(struct bus_type *, struct bus_attribute *); * bus-specific setup * @p: The private data of the driver core, only the driver core can * touch this. + * @lock_key: Lock class key for use by the lock validator * * A bus is a channel between the processor and one or more devices. For the * purposes of the device model, all devices are connected via a bus, even if @@ -635,6 +636,7 @@ struct acpi_dev_node { * segment limitations. * @dma_pools: Dma pools (if dma'ble device). * @dma_mem: Internal for coherent mem override. + * @cma_area: Contiguous memory area for dma allocations * @archdata: For arch-specific additions. * @of_node: Associated device tree node. * @acpi_node: Associated ACPI device node. @@ -648,6 +650,7 @@ struct acpi_dev_node { * @release: Callback to free the device after all references have * gone away. This should be set by the allocator of the * device (i.e. the bus driver that discovered the device). + * @iommu_group: IOMMU group the device belongs to. * * At the lowest level, every device in a Linux system is represented by an * instance of struct device. The device structure contains the information -- cgit v1.2.3