aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iio
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-05-21 00:26:15 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2016-05-21 00:26:15 -0400
commit3aa2fc1667acdd9cca816a2bc9529f494bd61b05 (patch)
tree2379f33e47edacbc7a4bdf19607642d9c53caa11 /drivers/iio
parent5af2344013454640e0133bb62e8cf2e30190a472 (diff)
parentc6e360a0d9d282e9c8688dcdabdc3669912b66ef (diff)
Merge tag 'driver-core-4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
Pull driver core updates from Greg KH: "Here's the "big" driver core update for 4.7-rc1. Mostly just debugfs changes, the long-known and messy races with removing debugfs files should be fixed thanks to the great work of Nicolai Stange. We also have some isa updates in here (the x86 maintainers told me to take it through this tree), a new warning when we run out of dynamic char major numbers, and a few other assorted changes, details in the shortlog. All have been in linux-next for some time with no reported issues" * tag 'driver-core-4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (32 commits) Revert "base: dd: don't remove driver_data in -EPROBE_DEFER case" gpio: ws16c48: Utilize the ISA bus driver gpio: 104-idio-16: Utilize the ISA bus driver gpio: 104-idi-48: Utilize the ISA bus driver gpio: 104-dio-48e: Utilize the ISA bus driver watchdog: ebc-c384_wdt: Utilize the ISA bus driver iio: stx104: Utilize the module_isa_driver and max_num_isa_dev macros iio: stx104: Add X86 dependency to STX104 Kconfig option Documentation: Add ISA bus driver documentation isa: Implement the max_num_isa_dev macro isa: Implement the module_isa_driver macro pnp: pnpbios: Add explicit X86_32 dependency to PNPBIOS isa: Decouple X86_32 dependency from the ISA Kconfig option driver-core: use 'dev' argument in dev_dbg_ratelimited stub base: dd: don't remove driver_data in -EPROBE_DEFER case kernfs: Move faulting copy_user operations outside of the mutex devcoredump: add scatterlist support debugfs: unproxify files created through debugfs_create_u32_array() debugfs: unproxify files created through debugfs_create_blob() debugfs: unproxify files created through debugfs_create_bool() ...
Diffstat (limited to 'drivers/iio')
-rw-r--r--drivers/iio/dac/Kconfig2
-rw-r--r--drivers/iio/dac/stx104.c24
2 files changed, 4 insertions, 22 deletions
diff --git a/drivers/iio/dac/Kconfig b/drivers/iio/dac/Kconfig
index a995139f907c..6abcfb8597d9 100644
--- a/drivers/iio/dac/Kconfig
+++ b/drivers/iio/dac/Kconfig
@@ -210,7 +210,7 @@ config MCP4922
210 210
211config STX104 211config STX104
212 tristate "Apex Embedded Systems STX104 DAC driver" 212 tristate "Apex Embedded Systems STX104 DAC driver"
213 depends on ISA 213 depends on X86 && ISA
214 help 214 help
215 Say yes here to build support for the 2-channel DAC on the Apex 215 Say yes here to build support for the 2-channel DAC on the Apex
216 Embedded Systems STX104 integrated analog PC/104 card. The base port 216 Embedded Systems STX104 integrated analog PC/104 card. The base port
diff --git a/drivers/iio/dac/stx104.c b/drivers/iio/dac/stx104.c
index 174f4b75ceed..27941220872f 100644
--- a/drivers/iio/dac/stx104.c
+++ b/drivers/iio/dac/stx104.c
@@ -33,16 +33,9 @@
33} 33}
34 34
35#define STX104_EXTENT 16 35#define STX104_EXTENT 16
36/**
37 * The highest base address possible for an ISA device is 0x3FF; this results in
38 * 1024 possible base addresses. Dividing the number of possible base addresses
39 * by the address extent taken by each device results in the maximum number of
40 * devices on a system.
41 */
42#define MAX_NUM_STX104 (1024 / STX104_EXTENT)
43 36
44static unsigned base[MAX_NUM_STX104]; 37static unsigned int base[max_num_isa_dev(STX104_EXTENT)];
45static unsigned num_stx104; 38static unsigned int num_stx104;
46module_param_array(base, uint, &num_stx104, 0); 39module_param_array(base, uint, &num_stx104, 0);
47MODULE_PARM_DESC(base, "Apex Embedded Systems STX104 base addresses"); 40MODULE_PARM_DESC(base, "Apex Embedded Systems STX104 base addresses");
48 41
@@ -134,18 +127,7 @@ static struct isa_driver stx104_driver = {
134 } 127 }
135}; 128};
136 129
137static void __exit stx104_exit(void) 130module_isa_driver(stx104_driver, num_stx104);
138{
139 isa_unregister_driver(&stx104_driver);
140}
141
142static int __init stx104_init(void)
143{
144 return isa_register_driver(&stx104_driver, num_stx104);
145}
146
147module_init(stx104_init);
148module_exit(stx104_exit);
149 131
150MODULE_AUTHOR("William Breathitt Gray <vilhelm.gray@gmail.com>"); 132MODULE_AUTHOR("William Breathitt Gray <vilhelm.gray@gmail.com>");
151MODULE_DESCRIPTION("Apex Embedded Systems STX104 DAC driver"); 133MODULE_DESCRIPTION("Apex Embedded Systems STX104 DAC driver");