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

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'driver-core-4.7-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core

Pull driver core fixes from Greg KH:
"Here are a small number of debugfs, ISA, and one driver core fix for
4.7-rc4.

All of these resolve reported issues. The ISA ones have spent the
least amount of time in linux-next, sorry about that, I didn't realize
they were regressions that needed to get in now (thanks to Thorsten
for the prodding!) but they do all pass the 0-day bot tests. The
others have been in linux-next for a while now.

Full details about them are in the shortlog below"

* tag 'driver-core-4.7-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
isa: Dummy isa_register_driver should return error code
isa: Call isa_bus_init before dependent ISA bus drivers register
watchdog: ebc-c384_wdt: Allow build for X86_64
iio: stx104: Allow build for X86_64
gpio: Allow PC/104 devices on X86_64
isa: Allow ISA-style drivers on modern systems
base: make module_create_drivers_dir race-free
debugfs: open_proxy_open(): avoid double fops release
debugfs: full_proxy_open(): free proxy on ->open() failure
kernel/kcov: unproxify debugfs file's fops

+38 -17
+3
arch/Kconfig
··· 606 606 file which provides platform-specific implementations of some 607 607 functions in <linux/hash.h> or fs/namei.c. 608 608 609 + config ISA_BUS_API 610 + def_bool ISA 611 + 609 612 # 610 613 # ABI hall of shame 611 614 #
+9
arch/x86/Kconfig
··· 2439 2439 2440 2440 source "drivers/pci/Kconfig" 2441 2441 2442 + config ISA_BUS 2443 + bool "ISA-style bus support on modern systems" if EXPERT 2444 + select ISA_BUS_API 2445 + help 2446 + Enables ISA-style drivers on modern systems. This is necessary to 2447 + support PC/104 devices on X86_64 platforms. 2448 + 2449 + If unsure, say N. 2450 + 2442 2451 # x86_64 have no ISA slots, but can have ISA-style DMA. 2443 2452 config ISA_DMA_API 2444 2453 bool "ISA-style DMA support" if (X86_64 && EXPERT)
+1 -1
drivers/base/Makefile
··· 10 10 obj-y += power/ 11 11 obj-$(CONFIG_HAS_DMA) += dma-mapping.o 12 12 obj-$(CONFIG_HAVE_GENERIC_DMA_COHERENT) += dma-coherent.o 13 - obj-$(CONFIG_ISA) += isa.o 13 + obj-$(CONFIG_ISA_BUS_API) += isa.o 14 14 obj-$(CONFIG_FW_LOADER) += firmware_class.o 15 15 obj-$(CONFIG_NUMA) += node.o 16 16 obj-$(CONFIG_MEMORY_HOTPLUG_SPARSE) += memory.o
+1 -1
drivers/base/isa.c
··· 180 180 return error; 181 181 } 182 182 183 - device_initcall(isa_bus_init); 183 + postcore_initcall(isa_bus_init);
+5 -3
drivers/base/module.c
··· 24 24 25 25 static void module_create_drivers_dir(struct module_kobject *mk) 26 26 { 27 - if (!mk || mk->drivers_dir) 28 - return; 27 + static DEFINE_MUTEX(drivers_dir_mutex); 29 28 30 - mk->drivers_dir = kobject_create_and_add("drivers", &mk->kobj); 29 + mutex_lock(&drivers_dir_mutex); 30 + if (mk && !mk->drivers_dir) 31 + mk->drivers_dir = kobject_create_and_add("drivers", &mk->kobj); 32 + mutex_unlock(&drivers_dir_mutex); 31 33 } 32 34 33 35 void module_add_driver(struct module *mod, struct device_driver *drv)
+4 -4
drivers/gpio/Kconfig
··· 531 531 532 532 config GPIO_104_DIO_48E 533 533 tristate "ACCES 104-DIO-48E GPIO support" 534 - depends on ISA 534 + depends on ISA_BUS_API 535 535 select GPIOLIB_IRQCHIP 536 536 help 537 537 Enables GPIO support for the ACCES 104-DIO-48E series (104-DIO-48E, ··· 541 541 542 542 config GPIO_104_IDIO_16 543 543 tristate "ACCES 104-IDIO-16 GPIO support" 544 - depends on ISA 544 + depends on ISA_BUS_API 545 545 select GPIOLIB_IRQCHIP 546 546 help 547 547 Enables GPIO support for the ACCES 104-IDIO-16 family (104-IDIO-16, ··· 552 552 553 553 config GPIO_104_IDI_48 554 554 tristate "ACCES 104-IDI-48 GPIO support" 555 - depends on ISA 555 + depends on ISA_BUS_API 556 556 select GPIOLIB_IRQCHIP 557 557 help 558 558 Enables GPIO support for the ACCES 104-IDI-48 family (104-IDI-48A, ··· 628 628 629 629 config GPIO_WS16C48 630 630 tristate "WinSystems WS16C48 GPIO support" 631 - depends on ISA 631 + depends on ISA_BUS_API 632 632 select GPIOLIB_IRQCHIP 633 633 help 634 634 Enables GPIO support for the WinSystems WS16C48. The base port
+1 -1
drivers/iio/dac/Kconfig
··· 247 247 248 248 config STX104 249 249 tristate "Apex Embedded Systems STX104 DAC driver" 250 - depends on X86 && ISA 250 + depends on X86 && ISA_BUS_API 251 251 help 252 252 Say yes here to build support for the 2-channel DAC on the Apex 253 253 Embedded Systems STX104 integrated analog PC/104 card. The base port
+1 -1
drivers/watchdog/Kconfig
··· 746 746 747 747 config EBC_C384_WDT 748 748 tristate "WinSystems EBC-C384 Watchdog Timer" 749 - depends on X86 && ISA 749 + depends on X86 && ISA_BUS_API 750 750 select WATCHDOG_CORE 751 751 help 752 752 Enables watchdog timer support for the watchdog timer on the
+4 -3
fs/debugfs/file.c
··· 127 127 r = real_fops->open(inode, filp); 128 128 129 129 out: 130 - fops_put(real_fops); 131 130 debugfs_use_file_finish(srcu_idx); 132 131 return r; 133 132 } ··· 261 262 262 263 if (real_fops->open) { 263 264 r = real_fops->open(inode, filp); 264 - 265 - if (filp->f_op != proxy_fops) { 265 + if (r) { 266 + replace_fops(filp, d_inode(dentry)->i_fop); 267 + goto free_proxy; 268 + } else if (filp->f_op != proxy_fops) { 266 269 /* No protection against file removal anymore. */ 267 270 WARN(1, "debugfs file owner replaced proxy fops: %pd", 268 271 dentry);
+3 -2
include/linux/isa.h
··· 6 6 #define __LINUX_ISA_H 7 7 8 8 #include <linux/device.h> 9 + #include <linux/errno.h> 9 10 #include <linux/kernel.h> 10 11 11 12 struct isa_driver { ··· 23 22 24 23 #define to_isa_driver(x) container_of((x), struct isa_driver, driver) 25 24 26 - #ifdef CONFIG_ISA 25 + #ifdef CONFIG_ISA_BUS_API 27 26 int isa_register_driver(struct isa_driver *, unsigned int); 28 27 void isa_unregister_driver(struct isa_driver *); 29 28 #else 30 29 static inline int isa_register_driver(struct isa_driver *d, unsigned int i) 31 30 { 32 - return 0; 31 + return -ENODEV; 33 32 } 34 33 35 34 static inline void isa_unregister_driver(struct isa_driver *d)
+6 -1
kernel/kcov.c
··· 264 264 265 265 static int __init kcov_init(void) 266 266 { 267 - if (!debugfs_create_file("kcov", 0600, NULL, NULL, &kcov_fops)) { 267 + /* 268 + * The kcov debugfs file won't ever get removed and thus, 269 + * there is no need to protect it against removal races. The 270 + * use of debugfs_create_file_unsafe() is actually safe here. 271 + */ 272 + if (!debugfs_create_file_unsafe("kcov", 0600, NULL, NULL, &kcov_fops)) { 268 273 pr_err("failed to create kcov in debugfs\n"); 269 274 return -ENOMEM; 270 275 }