diff options
author | Marko Kohtala <marko.kohtala@gmail.com> | 2006-01-06 03:19:48 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-06 11:33:57 -0500 |
commit | a6767b7cc674ee39635db75ed2f6f65ed0012239 (patch) | |
tree | 95db09902a556747df45ac0a0a0c8e164fb94a80 /drivers | |
parent | b44d3bdd6fcf6233b381bf5bd0893ed235f497a9 (diff) |
[PATCH] parport: constification
Trivial "const" additions to places in parport that truly are const.
Signed-off-by: Marko Kohtala <marko.kohtala@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/parport/parport_pc.c | 30 | ||||
-rw-r--r-- | drivers/parport/probe.c | 6 |
2 files changed, 21 insertions, 15 deletions
diff --git a/drivers/parport/parport_pc.c b/drivers/parport/parport_pc.c index c6493ad7c0c8..18e85ccdae67 100644 --- a/drivers/parport/parport_pc.c +++ b/drivers/parport/parport_pc.c | |||
@@ -1169,7 +1169,7 @@ dump_parport_state ("fwd idle", port); | |||
1169 | 1169 | ||
1170 | /* GCC is not inlining extern inline function later overwriten to non-inline, | 1170 | /* GCC is not inlining extern inline function later overwriten to non-inline, |
1171 | so we use outlined_ variants here. */ | 1171 | so we use outlined_ variants here. */ |
1172 | static struct parport_operations parport_pc_ops = | 1172 | static const struct parport_operations parport_pc_ops = |
1173 | { | 1173 | { |
1174 | .write_data = parport_pc_write_data, | 1174 | .write_data = parport_pc_write_data, |
1175 | .read_data = parport_pc_read_data, | 1175 | .read_data = parport_pc_read_data, |
@@ -1211,10 +1211,11 @@ static struct parport_operations parport_pc_ops = | |||
1211 | static void __devinit show_parconfig_smsc37c669(int io, int key) | 1211 | static void __devinit show_parconfig_smsc37c669(int io, int key) |
1212 | { | 1212 | { |
1213 | int cr1,cr4,cra,cr23,cr26,cr27,i=0; | 1213 | int cr1,cr4,cra,cr23,cr26,cr27,i=0; |
1214 | static const char *modes[]={ "SPP and Bidirectional (PS/2)", | 1214 | static const char *const modes[]={ |
1215 | "EPP and SPP", | 1215 | "SPP and Bidirectional (PS/2)", |
1216 | "ECP", | 1216 | "EPP and SPP", |
1217 | "ECP and EPP" }; | 1217 | "ECP", |
1218 | "ECP and EPP" }; | ||
1218 | 1219 | ||
1219 | outb(key,io); | 1220 | outb(key,io); |
1220 | outb(key,io); | 1221 | outb(key,io); |
@@ -1288,7 +1289,7 @@ static void __devinit show_parconfig_smsc37c669(int io, int key) | |||
1288 | static void __devinit show_parconfig_winbond(int io, int key) | 1289 | static void __devinit show_parconfig_winbond(int io, int key) |
1289 | { | 1290 | { |
1290 | int cr30,cr60,cr61,cr70,cr74,crf0,i=0; | 1291 | int cr30,cr60,cr61,cr70,cr74,crf0,i=0; |
1291 | static const char *modes[] = { | 1292 | static const char *const modes[] = { |
1292 | "Standard (SPP) and Bidirectional(PS/2)", /* 0 */ | 1293 | "Standard (SPP) and Bidirectional(PS/2)", /* 0 */ |
1293 | "EPP-1.9 and SPP", | 1294 | "EPP-1.9 and SPP", |
1294 | "ECP", | 1295 | "ECP", |
@@ -1297,7 +1298,9 @@ static void __devinit show_parconfig_winbond(int io, int key) | |||
1297 | "EPP-1.7 and SPP", /* 5 */ | 1298 | "EPP-1.7 and SPP", /* 5 */ |
1298 | "undefined!", | 1299 | "undefined!", |
1299 | "ECP and EPP-1.7" }; | 1300 | "ECP and EPP-1.7" }; |
1300 | static char *irqtypes[] = { "pulsed low, high-Z", "follows nACK" }; | 1301 | static char *const irqtypes[] = { |
1302 | "pulsed low, high-Z", | ||
1303 | "follows nACK" }; | ||
1301 | 1304 | ||
1302 | /* The registers are called compatible-PnP because the | 1305 | /* The registers are called compatible-PnP because the |
1303 | register layout is modelled after ISA-PnP, the access | 1306 | register layout is modelled after ISA-PnP, the access |
@@ -2396,7 +2399,8 @@ EXPORT_SYMBOL (parport_pc_unregister_port); | |||
2396 | 2399 | ||
2397 | /* ITE support maintained by Rich Liu <richliu@poorman.org> */ | 2400 | /* ITE support maintained by Rich Liu <richliu@poorman.org> */ |
2398 | static int __devinit sio_ite_8872_probe (struct pci_dev *pdev, int autoirq, | 2401 | static int __devinit sio_ite_8872_probe (struct pci_dev *pdev, int autoirq, |
2399 | int autodma, struct parport_pc_via_data *via) | 2402 | int autodma, |
2403 | const struct parport_pc_via_data *via) | ||
2400 | { | 2404 | { |
2401 | short inta_addr[6] = { 0x2A0, 0x2C0, 0x220, 0x240, 0x1E0 }; | 2405 | short inta_addr[6] = { 0x2A0, 0x2C0, 0x220, 0x240, 0x1E0 }; |
2402 | struct resource *base_res; | 2406 | struct resource *base_res; |
@@ -2524,7 +2528,8 @@ static struct parport_pc_via_data via_8231_data __devinitdata = { | |||
2524 | }; | 2528 | }; |
2525 | 2529 | ||
2526 | static int __devinit sio_via_probe (struct pci_dev *pdev, int autoirq, | 2530 | static int __devinit sio_via_probe (struct pci_dev *pdev, int autoirq, |
2527 | int autodma, struct parport_pc_via_data *via) | 2531 | int autodma, |
2532 | const struct parport_pc_via_data *via) | ||
2528 | { | 2533 | { |
2529 | u8 tmp, tmp2, siofunc; | 2534 | u8 tmp, tmp2, siofunc; |
2530 | u8 ppcontrol = 0; | 2535 | u8 ppcontrol = 0; |
@@ -2694,8 +2699,9 @@ enum parport_pc_sio_types { | |||
2694 | 2699 | ||
2695 | /* each element directly indexed from enum list, above */ | 2700 | /* each element directly indexed from enum list, above */ |
2696 | static struct parport_pc_superio { | 2701 | static struct parport_pc_superio { |
2697 | int (*probe) (struct pci_dev *pdev, int autoirq, int autodma, struct parport_pc_via_data *via); | 2702 | int (*probe) (struct pci_dev *pdev, int autoirq, int autodma, |
2698 | struct parport_pc_via_data *via; | 2703 | const struct parport_pc_via_data *via); |
2704 | const struct parport_pc_via_data *via; | ||
2699 | } parport_pc_superio_info[] __devinitdata = { | 2705 | } parport_pc_superio_info[] __devinitdata = { |
2700 | { sio_via_probe, &via_686a_data, }, | 2706 | { sio_via_probe, &via_686a_data, }, |
2701 | { sio_via_probe, &via_8231_data, }, | 2707 | { sio_via_probe, &via_8231_data, }, |
@@ -2828,7 +2834,7 @@ static struct parport_pc_pci { | |||
2828 | /* netmos_9815 */ { 2, { { 0, -1 }, { 2, -1 }, } }, /* untested */ | 2834 | /* netmos_9815 */ { 2, { { 0, -1 }, { 2, -1 }, } }, /* untested */ |
2829 | }; | 2835 | }; |
2830 | 2836 | ||
2831 | static struct pci_device_id parport_pc_pci_tbl[] = { | 2837 | static const struct pci_device_id parport_pc_pci_tbl[] = { |
2832 | /* Super-IO onboard chips */ | 2838 | /* Super-IO onboard chips */ |
2833 | { 0x1106, 0x0686, PCI_ANY_ID, PCI_ANY_ID, 0, 0, sio_via_686a }, | 2839 | { 0x1106, 0x0686, PCI_ANY_ID, PCI_ANY_ID, 0, 0, sio_via_686a }, |
2834 | { 0x1106, 0x8231, PCI_ANY_ID, PCI_ANY_ID, 0, 0, sio_via_8231 }, | 2840 | { 0x1106, 0x8231, PCI_ANY_ID, PCI_ANY_ID, 0, 0, sio_via_8231 }, |
diff --git a/drivers/parport/probe.c b/drivers/parport/probe.c index 5c29e8222211..b62aee8de3cb 100644 --- a/drivers/parport/probe.c +++ b/drivers/parport/probe.c | |||
@@ -11,9 +11,9 @@ | |||
11 | #include <linux/string.h> | 11 | #include <linux/string.h> |
12 | #include <asm/uaccess.h> | 12 | #include <asm/uaccess.h> |
13 | 13 | ||
14 | static struct { | 14 | static const struct { |
15 | char *token; | 15 | const char *token; |
16 | char *descr; | 16 | const char *descr; |
17 | } classes[] = { | 17 | } classes[] = { |
18 | { "", "Legacy device" }, | 18 | { "", "Legacy device" }, |
19 | { "PRINTER", "Printer" }, | 19 | { "PRINTER", "Printer" }, |