aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/parport/parport_pc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/parport/parport_pc.c')
-rw-r--r--drivers/parport/parport_pc.c55
1 files changed, 26 insertions, 29 deletions
diff --git a/drivers/parport/parport_pc.c b/drivers/parport/parport_pc.c
index 5abffe58a9d2..903e1285fda0 100644
--- a/drivers/parport/parport_pc.c
+++ b/drivers/parport/parport_pc.c
@@ -953,7 +953,7 @@ static struct superio_struct *find_free_superio(void)
953 953
954 954
955/* Super-IO chipset detection, Winbond, SMSC */ 955/* Super-IO chipset detection, Winbond, SMSC */
956static void __devinit show_parconfig_smsc37c669(int io, int key) 956static void show_parconfig_smsc37c669(int io, int key)
957{ 957{
958 int cr1, cr4, cra, cr23, cr26, cr27; 958 int cr1, cr4, cra, cr23, cr26, cr27;
959 struct superio_struct *s; 959 struct superio_struct *s;
@@ -1038,7 +1038,7 @@ static void __devinit show_parconfig_smsc37c669(int io, int key)
1038} 1038}
1039 1039
1040 1040
1041static void __devinit show_parconfig_winbond(int io, int key) 1041static void show_parconfig_winbond(int io, int key)
1042{ 1042{
1043 int cr30, cr60, cr61, cr70, cr74, crf0; 1043 int cr30, cr60, cr61, cr70, cr74, crf0;
1044 struct superio_struct *s; 1044 struct superio_struct *s;
@@ -1106,8 +1106,7 @@ static void __devinit show_parconfig_winbond(int io, int key)
1106 } 1106 }
1107} 1107}
1108 1108
1109static void __devinit decode_winbond(int efer, int key, int devid, 1109static void decode_winbond(int efer, int key, int devid, int devrev, int oldid)
1110 int devrev, int oldid)
1111{ 1110{
1112 const char *type = "unknown"; 1111 const char *type = "unknown";
1113 int id, progif = 2; 1112 int id, progif = 2;
@@ -1159,7 +1158,7 @@ static void __devinit decode_winbond(int efer, int key, int devid,
1159 show_parconfig_winbond(efer, key); 1158 show_parconfig_winbond(efer, key);
1160} 1159}
1161 1160
1162static void __devinit decode_smsc(int efer, int key, int devid, int devrev) 1161static void decode_smsc(int efer, int key, int devid, int devrev)
1163{ 1162{
1164 const char *type = "unknown"; 1163 const char *type = "unknown";
1165 void (*func)(int io, int key); 1164 void (*func)(int io, int key);
@@ -1193,7 +1192,7 @@ static void __devinit decode_smsc(int efer, int key, int devid, int devrev)
1193} 1192}
1194 1193
1195 1194
1196static void __devinit winbond_check(int io, int key) 1195static void winbond_check(int io, int key)
1197{ 1196{
1198 int origval, devid, devrev, oldid, x_devid, x_devrev, x_oldid; 1197 int origval, devid, devrev, oldid, x_devid, x_devrev, x_oldid;
1199 1198
@@ -1231,7 +1230,7 @@ out:
1231 release_region(io, 3); 1230 release_region(io, 3);
1232} 1231}
1233 1232
1234static void __devinit winbond_check2(int io, int key) 1233static void winbond_check2(int io, int key)
1235{ 1234{
1236 int origval[3], devid, devrev, oldid, x_devid, x_devrev, x_oldid; 1235 int origval[3], devid, devrev, oldid, x_devid, x_devrev, x_oldid;
1237 1236
@@ -1272,7 +1271,7 @@ out:
1272 release_region(io, 3); 1271 release_region(io, 3);
1273} 1272}
1274 1273
1275static void __devinit smsc_check(int io, int key) 1274static void smsc_check(int io, int key)
1276{ 1275{
1277 int origval, id, rev, oldid, oldrev, x_id, x_rev, x_oldid, x_oldrev; 1276 int origval, id, rev, oldid, oldrev, x_id, x_rev, x_oldid, x_oldrev;
1278 1277
@@ -1316,7 +1315,7 @@ out:
1316} 1315}
1317 1316
1318 1317
1319static void __devinit detect_and_report_winbond(void) 1318static void detect_and_report_winbond(void)
1320{ 1319{
1321 if (verbose_probing) 1320 if (verbose_probing)
1322 printk(KERN_DEBUG "Winbond Super-IO detection, now testing ports 3F0,370,250,4E,2E ...\n"); 1321 printk(KERN_DEBUG "Winbond Super-IO detection, now testing ports 3F0,370,250,4E,2E ...\n");
@@ -1329,7 +1328,7 @@ static void __devinit detect_and_report_winbond(void)
1329 winbond_check2(0x250, 0x89); 1328 winbond_check2(0x250, 0x89);
1330} 1329}
1331 1330
1332static void __devinit detect_and_report_smsc(void) 1331static void detect_and_report_smsc(void)
1333{ 1332{
1334 if (verbose_probing) 1333 if (verbose_probing)
1335 printk(KERN_DEBUG "SMSC Super-IO detection, now testing Ports 2F0, 370 ...\n"); 1334 printk(KERN_DEBUG "SMSC Super-IO detection, now testing Ports 2F0, 370 ...\n");
@@ -1339,7 +1338,7 @@ static void __devinit detect_and_report_smsc(void)
1339 smsc_check(0x370, 0x44); 1338 smsc_check(0x370, 0x44);
1340} 1339}
1341 1340
1342static void __devinit detect_and_report_it87(void) 1341static void detect_and_report_it87(void)
1343{ 1342{
1344 u16 dev; 1343 u16 dev;
1345 u8 origval, r; 1344 u8 origval, r;
@@ -1796,24 +1795,24 @@ static int parport_ECPEPP_supported(struct parport *pb)
1796#else /* No IEEE 1284 support */ 1795#else /* No IEEE 1284 support */
1797 1796
1798/* Don't bother probing for modes we know we won't use. */ 1797/* Don't bother probing for modes we know we won't use. */
1799static int __devinit parport_PS2_supported(struct parport *pb) { return 0; } 1798static int parport_PS2_supported(struct parport *pb) { return 0; }
1800#ifdef CONFIG_PARPORT_PC_FIFO 1799#ifdef CONFIG_PARPORT_PC_FIFO
1801static int parport_ECP_supported(struct parport *pb) 1800static int parport_ECP_supported(struct parport *pb)
1802{ 1801{
1803 return 0; 1802 return 0;
1804} 1803}
1805#endif 1804#endif
1806static int __devinit parport_EPP_supported(struct parport *pb) 1805static int parport_EPP_supported(struct parport *pb)
1807{ 1806{
1808 return 0; 1807 return 0;
1809} 1808}
1810 1809
1811static int __devinit parport_ECPEPP_supported(struct parport *pb) 1810static int parport_ECPEPP_supported(struct parport *pb)
1812{ 1811{
1813 return 0; 1812 return 0;
1814} 1813}
1815 1814
1816static int __devinit parport_ECPPS2_supported(struct parport *pb) 1815static int parport_ECPPS2_supported(struct parport *pb)
1817{ 1816{
1818 return 0; 1817 return 0;
1819} 1818}
@@ -2269,9 +2268,8 @@ EXPORT_SYMBOL(parport_pc_unregister_port);
2269#ifdef CONFIG_PCI 2268#ifdef CONFIG_PCI
2270 2269
2271/* ITE support maintained by Rich Liu <richliu@poorman.org> */ 2270/* ITE support maintained by Rich Liu <richliu@poorman.org> */
2272static int __devinit sio_ite_8872_probe(struct pci_dev *pdev, int autoirq, 2271static int sio_ite_8872_probe(struct pci_dev *pdev, int autoirq, int autodma,
2273 int autodma, 2272 const struct parport_pc_via_data *via)
2274 const struct parport_pc_via_data *via)
2275{ 2273{
2276 short inta_addr[6] = { 0x2A0, 0x2C0, 0x220, 0x240, 0x1E0 }; 2274 short inta_addr[6] = { 0x2A0, 0x2C0, 0x220, 0x240, 0x1E0 };
2277 u32 ite8872set; 2275 u32 ite8872set;
@@ -2377,10 +2375,10 @@ static int __devinit sio_ite_8872_probe(struct pci_dev *pdev, int autoirq,
2377 2375
2378/* VIA 8231 support by Pavel Fedin <sonic_amiga@rambler.ru> 2376/* VIA 8231 support by Pavel Fedin <sonic_amiga@rambler.ru>
2379 based on VIA 686a support code by Jeff Garzik <jgarzik@pobox.com> */ 2377 based on VIA 686a support code by Jeff Garzik <jgarzik@pobox.com> */
2380static int __devinitdata parport_init_mode; 2378static int parport_init_mode;
2381 2379
2382/* Data for two known VIA chips */ 2380/* Data for two known VIA chips */
2383static struct parport_pc_via_data via_686a_data __devinitdata = { 2381static struct parport_pc_via_data via_686a_data = {
2384 0x51, 2382 0x51,
2385 0x50, 2383 0x50,
2386 0x85, 2384 0x85,
@@ -2389,7 +2387,7 @@ static struct parport_pc_via_data via_686a_data __devinitdata = {
2389 0xF0, 2387 0xF0,
2390 0xE6 2388 0xE6
2391}; 2389};
2392static struct parport_pc_via_data via_8231_data __devinitdata = { 2390static struct parport_pc_via_data via_8231_data = {
2393 0x45, 2391 0x45,
2394 0x44, 2392 0x44,
2395 0x50, 2393 0x50,
@@ -2399,9 +2397,8 @@ static struct parport_pc_via_data via_8231_data __devinitdata = {
2399 0xF6 2397 0xF6
2400}; 2398};
2401 2399
2402static int __devinit sio_via_probe(struct pci_dev *pdev, int autoirq, 2400static int sio_via_probe(struct pci_dev *pdev, int autoirq, int autodma,
2403 int autodma, 2401 const struct parport_pc_via_data *via)
2404 const struct parport_pc_via_data *via)
2405{ 2402{
2406 u8 tmp, tmp2, siofunc; 2403 u8 tmp, tmp2, siofunc;
2407 u8 ppcontrol = 0; 2404 u8 ppcontrol = 0;
@@ -2575,7 +2572,7 @@ static struct parport_pc_superio {
2575 int (*probe) (struct pci_dev *pdev, int autoirq, int autodma, 2572 int (*probe) (struct pci_dev *pdev, int autoirq, int autodma,
2576 const struct parport_pc_via_data *via); 2573 const struct parport_pc_via_data *via);
2577 const struct parport_pc_via_data *via; 2574 const struct parport_pc_via_data *via;
2578} parport_pc_superio_info[] __devinitdata = { 2575} parport_pc_superio_info[] = {
2579 { sio_via_probe, &via_686a_data, }, 2576 { sio_via_probe, &via_686a_data, },
2580 { sio_via_probe, &via_8231_data, }, 2577 { sio_via_probe, &via_8231_data, },
2581 { sio_ite_8872_probe, NULL, }, 2578 { sio_ite_8872_probe, NULL, },
@@ -2860,7 +2857,7 @@ static int parport_pc_pci_probe(struct pci_dev *dev,
2860 return -ENODEV; 2857 return -ENODEV;
2861} 2858}
2862 2859
2863static void __devexit parport_pc_pci_remove(struct pci_dev *dev) 2860static void parport_pc_pci_remove(struct pci_dev *dev)
2864{ 2861{
2865 struct pci_parport_data *data = pci_get_drvdata(dev); 2862 struct pci_parport_data *data = pci_get_drvdata(dev);
2866 int i; 2863 int i;
@@ -2879,7 +2876,7 @@ static struct pci_driver parport_pc_pci_driver = {
2879 .name = "parport_pc", 2876 .name = "parport_pc",
2880 .id_table = parport_pc_pci_tbl, 2877 .id_table = parport_pc_pci_tbl,
2881 .probe = parport_pc_pci_probe, 2878 .probe = parport_pc_pci_probe,
2882 .remove = __devexit_p(parport_pc_pci_remove), 2879 .remove = parport_pc_pci_remove,
2883}; 2880};
2884 2881
2885static int __init parport_pc_init_superio(int autoirq, int autodma) 2882static int __init parport_pc_init_superio(int autoirq, int autodma)
@@ -2983,7 +2980,7 @@ static struct pnp_driver parport_pc_pnp_driver = {
2983static struct pnp_driver parport_pc_pnp_driver; 2980static struct pnp_driver parport_pc_pnp_driver;
2984#endif /* CONFIG_PNP */ 2981#endif /* CONFIG_PNP */
2985 2982
2986static int __devinit parport_pc_platform_probe(struct platform_device *pdev) 2983static int parport_pc_platform_probe(struct platform_device *pdev)
2987{ 2984{
2988 /* Always succeed, the actual probing is done in 2985 /* Always succeed, the actual probing is done in
2989 * parport_pc_probe_port(). */ 2986 * parport_pc_probe_port(). */
@@ -2999,7 +2996,7 @@ static struct platform_driver parport_pc_platform_driver = {
2999}; 2996};
3000 2997
3001/* This is called by parport_pc_find_nonpci_ports (in asm/parport.h) */ 2998/* This is called by parport_pc_find_nonpci_ports (in asm/parport.h) */
3002static int __devinit __attribute__((unused)) 2999static int __attribute__((unused))
3003parport_pc_find_isa_ports(int autoirq, int autodma) 3000parport_pc_find_isa_ports(int autoirq, int autodma)
3004{ 3001{
3005 int count = 0; 3002 int count = 0;