aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/block/amiflop.c6
-rw-r--r--drivers/block/z2ram.c2
-rw-r--r--drivers/char/snsc_event.c2
-rw-r--r--drivers/char/vme_scc.c4
-rw-r--r--drivers/ide/legacy/macide.c3
-rw-r--r--drivers/input/keyboard/hilkbd.c4
-rw-r--r--drivers/input/misc/hp_sdc_rtc.c5
-rw-r--r--drivers/input/serio/hp_sdc_mlc.c5
-rw-r--r--drivers/input/serio/q40kbd.c2
-rw-r--r--drivers/media/video/et61x251/et61x251_core.c2
-rw-r--r--drivers/media/video/sn9c102/sn9c102_core.c2
-rw-r--r--drivers/media/video/zc0301/zc0301_core.c2
-rw-r--r--drivers/media/video/zoran_device.c2
-rw-r--r--drivers/media/video/zoran_driver.c2
-rw-r--r--drivers/net/82596.c7
-rw-r--r--drivers/net/apne.c3
-rw-r--r--drivers/net/mac89x0.c3
-rw-r--r--drivers/net/macmace.c3
-rw-r--r--drivers/net/sun3lance.c3
-rw-r--r--drivers/net/wireless/atmel.c2
-rw-r--r--drivers/video/Kconfig4
-rw-r--r--drivers/video/amifb.c4
-rw-r--r--drivers/video/dnfb.c3
-rw-r--r--drivers/video/hpfb.c2
-rw-r--r--drivers/video/pxafb.c5
25 files changed, 58 insertions, 24 deletions
diff --git a/drivers/block/amiflop.c b/drivers/block/amiflop.c
index c9751b2b57e6..7516baff3bb9 100644
--- a/drivers/block/amiflop.c
+++ b/drivers/block/amiflop.c
@@ -1714,10 +1714,10 @@ static int __init amiga_floppy_init(void)
1714 int i, ret; 1714 int i, ret;
1715 1715
1716 if (!MACH_IS_AMIGA) 1716 if (!MACH_IS_AMIGA)
1717 return -ENXIO; 1717 return -ENODEV;
1718 1718
1719 if (!AMIGAHW_PRESENT(AMI_FLOPPY)) 1719 if (!AMIGAHW_PRESENT(AMI_FLOPPY))
1720 return -ENXIO; 1720 return -ENODEV;
1721 1721
1722 if (register_blkdev(FLOPPY_MAJOR,"fd")) 1722 if (register_blkdev(FLOPPY_MAJOR,"fd"))
1723 return -EBUSY; 1723 return -EBUSY;
@@ -1755,7 +1755,7 @@ static int __init amiga_floppy_init(void)
1755 if (!floppy_queue) 1755 if (!floppy_queue)
1756 goto out_queue; 1756 goto out_queue;
1757 1757
1758 ret = -ENXIO; 1758 ret = -ENODEV;
1759 if (fd_probe_drives() < 1) /* No usable drives */ 1759 if (fd_probe_drives() < 1) /* No usable drives */
1760 goto out_probe; 1760 goto out_probe;
1761 1761
diff --git a/drivers/block/z2ram.c b/drivers/block/z2ram.c
index 2d5853cbd4b0..be20a67f1fa8 100644
--- a/drivers/block/z2ram.c
+++ b/drivers/block/z2ram.c
@@ -332,7 +332,7 @@ z2_init(void)
332 int ret; 332 int ret;
333 333
334 if (!MACH_IS_AMIGA) 334 if (!MACH_IS_AMIGA)
335 return -ENXIO; 335 return -ENODEV;
336 336
337 ret = -EBUSY; 337 ret = -EBUSY;
338 if (register_blkdev(Z2RAM_MAJOR, DEVICE_NAME)) 338 if (register_blkdev(Z2RAM_MAJOR, DEVICE_NAME))
diff --git a/drivers/char/snsc_event.c b/drivers/char/snsc_event.c
index 53b3d44f8c06..55a95892ccf9 100644
--- a/drivers/char/snsc_event.c
+++ b/drivers/char/snsc_event.c
@@ -17,7 +17,7 @@
17 17
18#include <linux/interrupt.h> 18#include <linux/interrupt.h>
19#include <linux/sched.h> 19#include <linux/sched.h>
20#include <linux/byteorder/generic.h> 20#include <asm/byteorder.h>
21#include <asm/sn/sn_sal.h> 21#include <asm/sn/sn_sal.h>
22#include <asm/unaligned.h> 22#include <asm/unaligned.h>
23#include "snsc.h" 23#include "snsc.h"
diff --git a/drivers/char/vme_scc.c b/drivers/char/vme_scc.c
index e122a0e87bb0..f17ac043b551 100644
--- a/drivers/char/vme_scc.c
+++ b/drivers/char/vme_scc.c
@@ -89,9 +89,7 @@ static void scc_break_ctl(struct tty_struct *tty, int break_state);
89 89
90static struct tty_driver *scc_driver; 90static struct tty_driver *scc_driver;
91 91
92struct scc_port scc_ports[2]; 92static struct scc_port scc_ports[2];
93
94int scc_initialized = 0;
95 93
96/*--------------------------------------------------------------------------- 94/*---------------------------------------------------------------------------
97 * Interface from generic_serial.c back here 95 * Interface from generic_serial.c back here
diff --git a/drivers/ide/legacy/macide.c b/drivers/ide/legacy/macide.c
index 1f527bbf8d96..caa2632dd08e 100644
--- a/drivers/ide/legacy/macide.c
+++ b/drivers/ide/legacy/macide.c
@@ -95,6 +95,9 @@ static int __init macide_init(void)
95 int irq; 95 int irq;
96 hw_regs_t hw; 96 hw_regs_t hw;
97 97
98 if (!MACH_IS_MAC)
99 return -ENODEV;
100
98 switch (macintosh_config->ide_type) { 101 switch (macintosh_config->ide_type) {
99 case MAC_IDE_QUADRA: 102 case MAC_IDE_QUADRA:
100 base = IDE_BASE; 103 base = IDE_BASE;
diff --git a/drivers/input/keyboard/hilkbd.c b/drivers/input/keyboard/hilkbd.c
index 50d80ecf0b80..aacf71f3cd44 100644
--- a/drivers/input/keyboard/hilkbd.c
+++ b/drivers/input/keyboard/hilkbd.c
@@ -217,6 +217,10 @@ hil_keyb_init(void)
217 return -ENOMEM; 217 return -ENOMEM;
218 218
219#if defined(CONFIG_HP300) 219#if defined(CONFIG_HP300)
220 if (!MACH_IS_HP300) {
221 err = -ENODEV;
222 goto err1;
223 }
220 if (!hwreg_present((void *)(HILBASE + HIL_DATA))) { 224 if (!hwreg_present((void *)(HILBASE + HIL_DATA))) {
221 printk(KERN_ERR "HIL: hardware register was not found\n"); 225 printk(KERN_ERR "HIL: hardware register was not found\n");
222 err = -ENODEV; 226 err = -ENODEV;
diff --git a/drivers/input/misc/hp_sdc_rtc.c b/drivers/input/misc/hp_sdc_rtc.c
index ab76ea442fa5..45e5d05b01de 100644
--- a/drivers/input/misc/hp_sdc_rtc.c
+++ b/drivers/input/misc/hp_sdc_rtc.c
@@ -691,6 +691,11 @@ static int __init hp_sdc_rtc_init(void)
691{ 691{
692 int ret; 692 int ret;
693 693
694#ifdef __mc68000__
695 if (!MACH_IS_HP300)
696 return -ENODEV;
697#endif
698
694 init_MUTEX(&i8042tregs); 699 init_MUTEX(&i8042tregs);
695 700
696 if ((ret = hp_sdc_request_timer_irq(&hp_sdc_rtc_isr))) 701 if ((ret = hp_sdc_request_timer_irq(&hp_sdc_rtc_isr)))
diff --git a/drivers/input/serio/hp_sdc_mlc.c b/drivers/input/serio/hp_sdc_mlc.c
index f1fd3b638a37..587398f5c9df 100644
--- a/drivers/input/serio/hp_sdc_mlc.c
+++ b/drivers/input/serio/hp_sdc_mlc.c
@@ -306,6 +306,11 @@ static int __init hp_sdc_mlc_init(void)
306{ 306{
307 hil_mlc *mlc = &hp_sdc_mlc; 307 hil_mlc *mlc = &hp_sdc_mlc;
308 308
309#ifdef __mc68000__
310 if (!MACH_IS_HP300)
311 return -ENODEV;
312#endif
313
309 printk(KERN_INFO PREFIX "Registering the System Domain Controller's HIL MLC.\n"); 314 printk(KERN_INFO PREFIX "Registering the System Domain Controller's HIL MLC.\n");
310 315
311 hp_sdc_mlc_priv.emtestmode = 0; 316 hp_sdc_mlc_priv.emtestmode = 0;
diff --git a/drivers/input/serio/q40kbd.c b/drivers/input/serio/q40kbd.c
index cb89aff2e160..d962a8d78b14 100644
--- a/drivers/input/serio/q40kbd.c
+++ b/drivers/input/serio/q40kbd.c
@@ -156,7 +156,7 @@ static int __init q40kbd_init(void)
156 int error; 156 int error;
157 157
158 if (!MACH_IS_Q40) 158 if (!MACH_IS_Q40)
159 return -EIO; 159 return -ENODEV;
160 160
161 error = platform_driver_register(&q40kbd_driver); 161 error = platform_driver_register(&q40kbd_driver);
162 if (error) 162 if (error)
diff --git a/drivers/media/video/et61x251/et61x251_core.c b/drivers/media/video/et61x251/et61x251_core.c
index 5e749c528a62..15d037ae25c5 100644
--- a/drivers/media/video/et61x251/et61x251_core.c
+++ b/drivers/media/video/et61x251/et61x251_core.c
@@ -34,7 +34,7 @@
34#include <linux/mm.h> 34#include <linux/mm.h>
35#include <linux/vmalloc.h> 35#include <linux/vmalloc.h>
36#include <linux/page-flags.h> 36#include <linux/page-flags.h>
37#include <linux/byteorder/generic.h> 37#include <asm/byteorder.h>
38#include <asm/page.h> 38#include <asm/page.h>
39#include <asm/uaccess.h> 39#include <asm/uaccess.h>
40 40
diff --git a/drivers/media/video/sn9c102/sn9c102_core.c b/drivers/media/video/sn9c102/sn9c102_core.c
index 5748b1e1a128..7f9c7bcf3c85 100644
--- a/drivers/media/video/sn9c102/sn9c102_core.c
+++ b/drivers/media/video/sn9c102/sn9c102_core.c
@@ -34,7 +34,7 @@
34#include <linux/mm.h> 34#include <linux/mm.h>
35#include <linux/vmalloc.h> 35#include <linux/vmalloc.h>
36#include <linux/page-flags.h> 36#include <linux/page-flags.h>
37#include <linux/byteorder/generic.h> 37#include <asm/byteorder.h>
38#include <asm/page.h> 38#include <asm/page.h>
39#include <asm/uaccess.h> 39#include <asm/uaccess.h>
40 40
diff --git a/drivers/media/video/zc0301/zc0301_core.c b/drivers/media/video/zc0301/zc0301_core.c
index 363dd2b9475c..e5c4e9f5193f 100644
--- a/drivers/media/video/zc0301/zc0301_core.c
+++ b/drivers/media/video/zc0301/zc0301_core.c
@@ -38,7 +38,7 @@
38#include <linux/mm.h> 38#include <linux/mm.h>
39#include <linux/vmalloc.h> 39#include <linux/vmalloc.h>
40#include <linux/page-flags.h> 40#include <linux/page-flags.h>
41#include <linux/byteorder/generic.h> 41#include <asm/byteorder.h>
42#include <asm/page.h> 42#include <asm/page.h>
43#include <asm/uaccess.h> 43#include <asm/uaccess.h>
44 44
diff --git a/drivers/media/video/zoran_device.c b/drivers/media/video/zoran_device.c
index 7b60533efe45..37629ffd34c3 100644
--- a/drivers/media/video/zoran_device.c
+++ b/drivers/media/video/zoran_device.c
@@ -31,7 +31,6 @@
31#include <linux/kernel.h> 31#include <linux/kernel.h>
32#include <linux/module.h> 32#include <linux/module.h>
33#include <linux/vmalloc.h> 33#include <linux/vmalloc.h>
34#include <linux/byteorder/generic.h>
35 34
36#include <linux/interrupt.h> 35#include <linux/interrupt.h>
37#include <linux/proc_fs.h> 36#include <linux/proc_fs.h>
@@ -47,6 +46,7 @@
47#include <linux/delay.h> 46#include <linux/delay.h>
48#include <linux/wait.h> 47#include <linux/wait.h>
49 48
49#include <asm/byteorder.h>
50#include <asm/io.h> 50#include <asm/io.h>
51 51
52#include "videocodec.h" 52#include "videocodec.h"
diff --git a/drivers/media/video/zoran_driver.c b/drivers/media/video/zoran_driver.c
index 0134bec1e399..345c77e46837 100644
--- a/drivers/media/video/zoran_driver.c
+++ b/drivers/media/video/zoran_driver.c
@@ -52,7 +52,6 @@
52#include <linux/pci.h> 52#include <linux/pci.h>
53#include <linux/vmalloc.h> 53#include <linux/vmalloc.h>
54#include <linux/wait.h> 54#include <linux/wait.h>
55#include <linux/byteorder/generic.h>
56 55
57#include <linux/interrupt.h> 56#include <linux/interrupt.h>
58#include <linux/i2c.h> 57#include <linux/i2c.h>
@@ -74,6 +73,7 @@
74#include <media/v4l2-common.h> 73#include <media/v4l2-common.h>
75#include "videocodec.h" 74#include "videocodec.h"
76 75
76#include <asm/byteorder.h>
77#include <asm/io.h> 77#include <asm/io.h>
78#include <asm/uaccess.h> 78#include <asm/uaccess.h>
79#include <linux/proc_fs.h> 79#include <linux/proc_fs.h>
diff --git a/drivers/net/82596.c b/drivers/net/82596.c
index 2797da7eeee6..da292e647eb1 100644
--- a/drivers/net/82596.c
+++ b/drivers/net/82596.c
@@ -1162,6 +1162,7 @@ struct net_device * __init i82596_probe(int unit)
1162 memcpy(eth_addr, (void *) 0xfffc1f2c, 6); /* YUCK! Get addr from NOVRAM */ 1162 memcpy(eth_addr, (void *) 0xfffc1f2c, 6); /* YUCK! Get addr from NOVRAM */
1163 dev->base_addr = MVME_I596_BASE; 1163 dev->base_addr = MVME_I596_BASE;
1164 dev->irq = (unsigned) MVME16x_IRQ_I596; 1164 dev->irq = (unsigned) MVME16x_IRQ_I596;
1165 goto found;
1165 } 1166 }
1166#endif 1167#endif
1167#ifdef ENABLE_BVME6000_NET 1168#ifdef ENABLE_BVME6000_NET
@@ -1176,6 +1177,7 @@ struct net_device * __init i82596_probe(int unit)
1176 rtc[3] = msr; 1177 rtc[3] = msr;
1177 dev->base_addr = BVME_I596_BASE; 1178 dev->base_addr = BVME_I596_BASE;
1178 dev->irq = (unsigned) BVME_IRQ_I596; 1179 dev->irq = (unsigned) BVME_IRQ_I596;
1180 goto found;
1179 } 1181 }
1180#endif 1182#endif
1181#ifdef ENABLE_APRICOT 1183#ifdef ENABLE_APRICOT
@@ -1212,8 +1214,13 @@ struct net_device * __init i82596_probe(int unit)
1212 } 1214 }
1213 1215
1214 dev->irq = 10; 1216 dev->irq = 10;
1217 goto found;
1215 } 1218 }
1216#endif 1219#endif
1220 err = -ENODEV;
1221 goto out;
1222
1223found:
1217 dev->mem_start = (int)__get_free_pages(GFP_ATOMIC, 0); 1224 dev->mem_start = (int)__get_free_pages(GFP_ATOMIC, 0);
1218 if (!dev->mem_start) { 1225 if (!dev->mem_start) {
1219 err = -ENOMEM; 1226 err = -ENOMEM;
diff --git a/drivers/net/apne.c b/drivers/net/apne.c
index 47a8275d3962..867f6fff543c 100644
--- a/drivers/net/apne.c
+++ b/drivers/net/apne.c
@@ -127,6 +127,9 @@ struct net_device * __init apne_probe(int unit)
127#endif 127#endif
128 int err; 128 int err;
129 129
130 if (!MACH_IS_AMIGA)
131 return ERR_PTR(-ENODEV);
132
130 if (apne_owned) 133 if (apne_owned)
131 return ERR_PTR(-ENODEV); 134 return ERR_PTR(-ENODEV);
132 135
diff --git a/drivers/net/mac89x0.c b/drivers/net/mac89x0.c
index 2a66e5b7cebc..4ce8afd481c3 100644
--- a/drivers/net/mac89x0.c
+++ b/drivers/net/mac89x0.c
@@ -183,6 +183,9 @@ struct net_device * __init mac89x0_probe(int unit)
183 int err = -ENODEV; 183 int err = -ENODEV;
184 DECLARE_MAC_BUF(mac); 184 DECLARE_MAC_BUF(mac);
185 185
186 if (!MACH_IS_MAC)
187 return ERR_PTR(-ENODEV);
188
186 dev = alloc_etherdev(sizeof(struct net_local)); 189 dev = alloc_etherdev(sizeof(struct net_local));
187 if (!dev) 190 if (!dev)
188 return ERR_PTR(-ENOMEM); 191 return ERR_PTR(-ENOMEM);
diff --git a/drivers/net/macmace.c b/drivers/net/macmace.c
index 18770527df99..51ad3765e075 100644
--- a/drivers/net/macmace.c
+++ b/drivers/net/macmace.c
@@ -781,6 +781,9 @@ static int __init mac_mace_init_module(void)
781{ 781{
782 int err; 782 int err;
783 783
784 if (!MACH_IS_MAC)
785 return -ENODEV;
786
784 if ((err = platform_driver_register(&mac_mace_driver))) { 787 if ((err = platform_driver_register(&mac_mace_driver))) {
785 printk(KERN_ERR "Driver registration failed\n"); 788 printk(KERN_ERR "Driver registration failed\n");
786 return err; 789 return err;
diff --git a/drivers/net/sun3lance.c b/drivers/net/sun3lance.c
index f8d46134daca..359452a06c67 100644
--- a/drivers/net/sun3lance.c
+++ b/drivers/net/sun3lance.c
@@ -250,6 +250,9 @@ struct net_device * __init sun3lance_probe(int unit)
250 static int found; 250 static int found;
251 int err = -ENODEV; 251 int err = -ENODEV;
252 252
253 if (!MACH_IS_SUN3 && !MACH_IS_SUN3X)
254 return ERR_PTR(-ENODEV);
255
253 /* check that this machine has an onboard lance */ 256 /* check that this machine has an onboard lance */
254 switch(idprom->id_machtype) { 257 switch(idprom->id_machtype) {
255 case SM_SUN3|SM_3_50: 258 case SM_SUN3|SM_3_50:
diff --git a/drivers/net/wireless/atmel.c b/drivers/net/wireless/atmel.c
index ef2da4023d68..438e63ecccf1 100644
--- a/drivers/net/wireless/atmel.c
+++ b/drivers/net/wireless/atmel.c
@@ -47,6 +47,7 @@
47#include <linux/string.h> 47#include <linux/string.h>
48#include <linux/ctype.h> 48#include <linux/ctype.h>
49#include <linux/timer.h> 49#include <linux/timer.h>
50#include <asm/byteorder.h>
50#include <asm/io.h> 51#include <asm/io.h>
51#include <asm/system.h> 52#include <asm/system.h>
52#include <asm/uaccess.h> 53#include <asm/uaccess.h>
@@ -60,7 +61,6 @@
60#include <linux/delay.h> 61#include <linux/delay.h>
61#include <linux/wireless.h> 62#include <linux/wireless.h>
62#include <net/iw_handler.h> 63#include <net/iw_handler.h>
63#include <linux/byteorder/generic.h>
64#include <linux/crc32.h> 64#include <linux/crc32.h>
65#include <linux/proc_fs.h> 65#include <linux/proc_fs.h>
66#include <linux/device.h> 66#include <linux/device.h>
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index 2cdaf1ff8315..002b61b4f0f6 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -627,11 +627,9 @@ config FB_MAC
627 select FB_CFB_IMAGEBLIT 627 select FB_CFB_IMAGEBLIT
628 select FB_MACMODES 628 select FB_MACMODES
629 629
630# bool ' Apple DAFB display support' CONFIG_FB_DAFB
631config FB_HP300 630config FB_HP300
632 bool 631 bool
633 depends on (FB = y) && HP300 632 depends on (FB = y) && DIO
634 select FB_CFB_FILLRECT
635 select FB_CFB_IMAGEBLIT 633 select FB_CFB_IMAGEBLIT
636 default y 634 default y
637 635
diff --git a/drivers/video/amifb.c b/drivers/video/amifb.c
index e6492c1048bf..05a328c11a8b 100644
--- a/drivers/video/amifb.c
+++ b/drivers/video/amifb.c
@@ -2261,7 +2261,7 @@ int __init amifb_init(void)
2261 amifb_setup(option); 2261 amifb_setup(option);
2262#endif 2262#endif
2263 if (!MACH_IS_AMIGA || !AMIGAHW_PRESENT(AMI_VIDEO)) 2263 if (!MACH_IS_AMIGA || !AMIGAHW_PRESENT(AMI_VIDEO))
2264 return -ENXIO; 2264 return -ENODEV;
2265 2265
2266 /* 2266 /*
2267 * We request all registers starting from bplpt[0] 2267 * We request all registers starting from bplpt[0]
@@ -2333,7 +2333,7 @@ default_chipset:
2333 strcat(fb_info.fix.id, "Unknown"); 2333 strcat(fb_info.fix.id, "Unknown");
2334 goto default_chipset; 2334 goto default_chipset;
2335#else /* CONFIG_FB_AMIGA_OCS */ 2335#else /* CONFIG_FB_AMIGA_OCS */
2336 err = -ENXIO; 2336 err = -ENODEV;
2337 goto amifb_error; 2337 goto amifb_error;
2338#endif /* CONFIG_FB_AMIGA_OCS */ 2338#endif /* CONFIG_FB_AMIGA_OCS */
2339 break; 2339 break;
diff --git a/drivers/video/dnfb.c b/drivers/video/dnfb.c
index b083ea7e9c69..606da043f4b4 100644
--- a/drivers/video/dnfb.c
+++ b/drivers/video/dnfb.c
@@ -284,6 +284,9 @@ int __init dnfb_init(void)
284{ 284{
285 int ret; 285 int ret;
286 286
287 if (!MACH_IS_APOLLO)
288 return -ENODEV;
289
287 if (fb_get_options("dnfb", NULL)) 290 if (fb_get_options("dnfb", NULL))
288 return -ENODEV; 291 return -ENODEV;
289 292
diff --git a/drivers/video/hpfb.c b/drivers/video/hpfb.c
index 2eb4fb159084..b8ebff1e8493 100644
--- a/drivers/video/hpfb.c
+++ b/drivers/video/hpfb.c
@@ -382,7 +382,7 @@ int __init hpfb_init(void)
382#define INTFBPADDR 0x560000 382#define INTFBPADDR 0x560000
383 383
384 if (!MACH_IS_HP300) 384 if (!MACH_IS_HP300)
385 return -ENXIO; 385 return -ENODEV;
386 386
387 if (fb_get_options("hpfb", NULL)) 387 if (fb_get_options("hpfb", NULL))
388 return -ENODEV; 388 return -ENODEV;
diff --git a/drivers/video/pxafb.c b/drivers/video/pxafb.c
index 48aea39c35a5..3ee314beacc1 100644
--- a/drivers/video/pxafb.c
+++ b/drivers/video/pxafb.c
@@ -355,9 +355,8 @@ static int pxafb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
355 } 355 }
356 356
357#ifdef CONFIG_CPU_FREQ 357#ifdef CONFIG_CPU_FREQ
358 pr_debug("pxafb: dma period = %d ps, clock = %d kHz\n", 358 pr_debug("pxafb: dma period = %d ps\n",
359 pxafb_display_dma_period(var), 359 pxafb_display_dma_period(var));
360 get_clk_frequency_khz(0));
361#endif 360#endif
362 361
363 return 0; 362 return 0;