diff options
| author | Tilman Schmidt <tilman@imap.cc> | 2007-03-29 04:20:34 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-03-29 11:22:25 -0400 |
| commit | 35dc8457822aedbc89afa9f69e7fa494b3da7b02 (patch) | |
| tree | 98a49f5f00b28832a6bcc4247302614437fd7e6a | |
| parent | 75e8defbe4236a358b1396bc6d9a1231e5eca225 (diff) | |
[PATCH] drivers/isdn/gigaset: mark some static data as const (v2)
Mark some static arrays as const that aren't and shouldn't be modified, and
remove incorrect static attribute from some variables.
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: Hansjoerg Lipp <hjlipp@web.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
| -rw-r--r-- | drivers/isdn/gigaset/bas-gigaset.c | 4 | ||||
| -rw-r--r-- | drivers/isdn/gigaset/common.c | 6 | ||||
| -rw-r--r-- | drivers/isdn/gigaset/ev-layer.c | 4 | ||||
| -rw-r--r-- | drivers/isdn/gigaset/isocdata.c | 4 | ||||
| -rw-r--r-- | drivers/isdn/gigaset/ser-gigaset.c | 2 | ||||
| -rw-r--r-- | drivers/isdn/gigaset/usb-gigaset.c | 4 |
6 files changed, 12 insertions, 12 deletions
diff --git a/drivers/isdn/gigaset/bas-gigaset.c b/drivers/isdn/gigaset/bas-gigaset.c index 63e51dd6debe..00e31609a238 100644 --- a/drivers/isdn/gigaset/bas-gigaset.c +++ b/drivers/isdn/gigaset/bas-gigaset.c | |||
| @@ -54,7 +54,7 @@ MODULE_PARM_DESC(cidmode, "Call-ID mode"); | |||
| 54 | #define USB_SX353_PRODUCT_ID 0x0022 | 54 | #define USB_SX353_PRODUCT_ID 0x0022 |
| 55 | 55 | ||
| 56 | /* table of devices that work with this driver */ | 56 | /* table of devices that work with this driver */ |
| 57 | static struct usb_device_id gigaset_table [] = { | 57 | static const struct usb_device_id gigaset_table [] = { |
| 58 | { USB_DEVICE(USB_GIGA_VENDOR_ID, USB_3070_PRODUCT_ID) }, | 58 | { USB_DEVICE(USB_GIGA_VENDOR_ID, USB_3070_PRODUCT_ID) }, |
| 59 | { USB_DEVICE(USB_GIGA_VENDOR_ID, USB_3075_PRODUCT_ID) }, | 59 | { USB_DEVICE(USB_GIGA_VENDOR_ID, USB_3075_PRODUCT_ID) }, |
| 60 | { USB_DEVICE(USB_GIGA_VENDOR_ID, USB_SX303_PRODUCT_ID) }, | 60 | { USB_DEVICE(USB_GIGA_VENDOR_ID, USB_SX303_PRODUCT_ID) }, |
| @@ -2305,7 +2305,7 @@ static void gigaset_disconnect(struct usb_interface *interface) | |||
| 2305 | gigaset_unassign(cs); | 2305 | gigaset_unassign(cs); |
| 2306 | } | 2306 | } |
| 2307 | 2307 | ||
| 2308 | static struct gigaset_ops gigops = { | 2308 | static const struct gigaset_ops gigops = { |
| 2309 | gigaset_write_cmd, | 2309 | gigaset_write_cmd, |
| 2310 | gigaset_write_room, | 2310 | gigaset_write_room, |
| 2311 | gigaset_chars_in_buffer, | 2311 | gigaset_chars_in_buffer, |
diff --git a/drivers/isdn/gigaset/common.c b/drivers/isdn/gigaset/common.c index b460a73a7c85..6df336bdd571 100644 --- a/drivers/isdn/gigaset/common.c +++ b/drivers/isdn/gigaset/common.c | |||
| @@ -944,8 +944,8 @@ static DEFINE_SPINLOCK(driver_lock); | |||
| 944 | struct cardstate *gigaset_get_cs_by_id(int id) | 944 | struct cardstate *gigaset_get_cs_by_id(int id) |
| 945 | { | 945 | { |
| 946 | unsigned long flags; | 946 | unsigned long flags; |
| 947 | static struct cardstate *ret = NULL; | 947 | struct cardstate *ret = NULL; |
| 948 | static struct cardstate *cs; | 948 | struct cardstate *cs; |
| 949 | struct gigaset_driver *drv; | 949 | struct gigaset_driver *drv; |
| 950 | unsigned i; | 950 | unsigned i; |
| 951 | 951 | ||
| @@ -999,7 +999,7 @@ void gigaset_debugdrivers(void) | |||
| 999 | static struct cardstate *gigaset_get_cs_by_minor(unsigned minor) | 999 | static struct cardstate *gigaset_get_cs_by_minor(unsigned minor) |
| 1000 | { | 1000 | { |
| 1001 | unsigned long flags; | 1001 | unsigned long flags; |
| 1002 | static struct cardstate *ret = NULL; | 1002 | struct cardstate *ret = NULL; |
| 1003 | struct gigaset_driver *drv; | 1003 | struct gigaset_driver *drv; |
| 1004 | unsigned index; | 1004 | unsigned index; |
| 1005 | 1005 | ||
diff --git a/drivers/isdn/gigaset/ev-layer.c b/drivers/isdn/gigaset/ev-layer.c index 4661e2c722bc..cec1ef342fcc 100644 --- a/drivers/isdn/gigaset/ev-layer.c +++ b/drivers/isdn/gigaset/ev-layer.c | |||
| @@ -409,7 +409,7 @@ static struct reply_t tab_cid[] = /* no dle mode */ //FIXME | |||
| 409 | }; | 409 | }; |
| 410 | #endif | 410 | #endif |
| 411 | 411 | ||
| 412 | static struct resp_type_t resp_type[]= | 412 | static const struct resp_type_t resp_type[] = |
| 413 | { | 413 | { |
| 414 | /*{"", RSP_EMPTY, RT_NOTHING},*/ | 414 | /*{"", RSP_EMPTY, RT_NOTHING},*/ |
| 415 | {"OK", RSP_OK, RT_NOTHING}, | 415 | {"OK", RSP_OK, RT_NOTHING}, |
| @@ -511,7 +511,7 @@ void gigaset_handle_modem_response(struct cardstate *cs) | |||
| 511 | unsigned char *argv[MAX_REC_PARAMS + 1]; | 511 | unsigned char *argv[MAX_REC_PARAMS + 1]; |
| 512 | int params; | 512 | int params; |
| 513 | int i, j; | 513 | int i, j; |
| 514 | struct resp_type_t *rt; | 514 | const struct resp_type_t *rt; |
| 515 | int curarg; | 515 | int curarg; |
| 516 | unsigned long flags; | 516 | unsigned long flags; |
| 517 | unsigned next, tail, head; | 517 | unsigned next, tail, head; |
diff --git a/drivers/isdn/gigaset/isocdata.c b/drivers/isdn/gigaset/isocdata.c index 8c0eb522dab1..e0505f238807 100644 --- a/drivers/isdn/gigaset/isocdata.c +++ b/drivers/isdn/gigaset/isocdata.c | |||
| @@ -274,7 +274,7 @@ static inline void dump_bytes(enum debuglevel level, const char *tag, | |||
| 274 | * bit 12..10 = number of trailing '1' bits in result | 274 | * bit 12..10 = number of trailing '1' bits in result |
| 275 | * bit 14..13 = number of bits added by stuffing | 275 | * bit 14..13 = number of bits added by stuffing |
| 276 | */ | 276 | */ |
| 277 | static u16 stufftab[5 * 256] = { | 277 | static const u16 stufftab[5 * 256] = { |
| 278 | // previous 1s = 0: | 278 | // previous 1s = 0: |
| 279 | 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, | 279 | 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, |
| 280 | 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x201f, | 280 | 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x201f, |
| @@ -629,7 +629,7 @@ static inline void hdlc_frag(struct bc_state *bcs, unsigned inbits) | |||
| 629 | * (replacing 8 by 7 to make it fit; the algorithm won't care) | 629 | * (replacing 8 by 7 to make it fit; the algorithm won't care) |
| 630 | * bit 7 set if there are 5 or more "interior" consecutive '1' bits | 630 | * bit 7 set if there are 5 or more "interior" consecutive '1' bits |
| 631 | */ | 631 | */ |
| 632 | static unsigned char bitcounts[256] = { | 632 | static const unsigned char bitcounts[256] = { |
| 633 | 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x04, | 633 | 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x04, |
| 634 | 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x05, | 634 | 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x05, |
| 635 | 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x04, | 635 | 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x04, |
diff --git a/drivers/isdn/gigaset/ser-gigaset.c b/drivers/isdn/gigaset/ser-gigaset.c index c8b7db65e48f..ea44302e6e7e 100644 --- a/drivers/isdn/gigaset/ser-gigaset.c +++ b/drivers/isdn/gigaset/ser-gigaset.c | |||
| @@ -459,7 +459,7 @@ static int gigaset_set_line_ctrl(struct cardstate *cs, unsigned cflag) | |||
| 459 | return -EINVAL; | 459 | return -EINVAL; |
| 460 | } | 460 | } |
| 461 | 461 | ||
| 462 | static struct gigaset_ops ops = { | 462 | static const struct gigaset_ops ops = { |
| 463 | gigaset_write_cmd, | 463 | gigaset_write_cmd, |
| 464 | gigaset_write_room, | 464 | gigaset_write_room, |
| 465 | gigaset_chars_in_buffer, | 465 | gigaset_chars_in_buffer, |
diff --git a/drivers/isdn/gigaset/usb-gigaset.c b/drivers/isdn/gigaset/usb-gigaset.c index 04f2ad7ba8b0..2baef349c12d 100644 --- a/drivers/isdn/gigaset/usb-gigaset.c +++ b/drivers/isdn/gigaset/usb-gigaset.c | |||
| @@ -50,7 +50,7 @@ MODULE_PARM_DESC(cidmode, "Call-ID mode"); | |||
| 50 | #define USB_M105_PRODUCT_ID 0x0009 | 50 | #define USB_M105_PRODUCT_ID 0x0009 |
| 51 | 51 | ||
| 52 | /* table of devices that work with this driver */ | 52 | /* table of devices that work with this driver */ |
| 53 | static struct usb_device_id gigaset_table [] = { | 53 | static const struct usb_device_id gigaset_table [] = { |
| 54 | { USB_DEVICE(USB_M105_VENDOR_ID, USB_M105_PRODUCT_ID) }, | 54 | { USB_DEVICE(USB_M105_VENDOR_ID, USB_M105_PRODUCT_ID) }, |
| 55 | { } /* Terminating entry */ | 55 | { } /* Terminating entry */ |
| 56 | }; | 56 | }; |
| @@ -860,7 +860,7 @@ static void gigaset_disconnect(struct usb_interface *interface) | |||
| 860 | gigaset_unassign(cs); | 860 | gigaset_unassign(cs); |
| 861 | } | 861 | } |
| 862 | 862 | ||
| 863 | static struct gigaset_ops ops = { | 863 | static const struct gigaset_ops ops = { |
| 864 | gigaset_write_cmd, | 864 | gigaset_write_cmd, |
| 865 | gigaset_write_room, | 865 | gigaset_write_room, |
| 866 | gigaset_chars_in_buffer, | 866 | gigaset_chars_in_buffer, |
