aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/pcmcia
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.cz>2008-07-28 10:53:11 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-28 11:28:03 -0400
commitff3e990e61a5a9124687a01a025c43b3564f82ab (patch)
tree416fe0b2c4a3f663efc7ecc3f518d3da710c04a9 /drivers/char/pcmcia
parent93110f698fe92fc4dfd86c78783aedf522c69eb9 (diff)
ipwireless: Constify buffer variables
ipwireless: Constify buffer variables Signed-off-by: David Sterba <dsterba@suse.cz> Signed-off-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/char/pcmcia')
-rw-r--r--drivers/char/pcmcia/ipwireless/hardware.c26
-rw-r--r--drivers/char/pcmcia/ipwireless/hardware.h2
-rw-r--r--drivers/char/pcmcia/ipwireless/tty.c2
3 files changed, 16 insertions, 14 deletions
diff --git a/drivers/char/pcmcia/ipwireless/hardware.c b/drivers/char/pcmcia/ipwireless/hardware.c
index ff2093d22109..814ea3228ca2 100644
--- a/drivers/char/pcmcia/ipwireless/hardware.c
+++ b/drivers/char/pcmcia/ipwireless/hardware.c
@@ -30,11 +30,11 @@
30static void ipw_send_setup_packet(struct ipw_hardware *hw); 30static void ipw_send_setup_packet(struct ipw_hardware *hw);
31static void handle_received_SETUP_packet(struct ipw_hardware *ipw, 31static void handle_received_SETUP_packet(struct ipw_hardware *ipw,
32 unsigned int address, 32 unsigned int address,
33 unsigned char *data, int len, 33 const unsigned char *data, int len,
34 int is_last); 34 int is_last);
35static void ipwireless_setup_timer(unsigned long data); 35static void ipwireless_setup_timer(unsigned long data);
36static void handle_received_CTRL_packet(struct ipw_hardware *hw, 36static void handle_received_CTRL_packet(struct ipw_hardware *hw,
37 unsigned int channel_idx, unsigned char *data, int len); 37 unsigned int channel_idx, const unsigned char *data, int len);
38 38
39/*#define TIMING_DIAGNOSTICS*/ 39/*#define TIMING_DIAGNOSTICS*/
40 40
@@ -615,8 +615,10 @@ static void pool_free(struct ipw_hardware *hw, struct ipw_rx_packet *packet)
615} 615}
616 616
617static void queue_received_packet(struct ipw_hardware *hw, 617static void queue_received_packet(struct ipw_hardware *hw,
618 unsigned int protocol, unsigned int address, 618 unsigned int protocol,
619 unsigned char *data, int length, int is_last) 619 unsigned int address,
620 const unsigned char *data, int length,
621 int is_last)
620{ 622{
621 unsigned int channel_idx = address - 1; 623 unsigned int channel_idx = address - 1;
622 struct ipw_rx_packet *packet = NULL; 624 struct ipw_rx_packet *packet = NULL;
@@ -760,10 +762,10 @@ static void ipw_receive_data_work(struct work_struct *work_rx)
760 762
761static void handle_received_CTRL_packet(struct ipw_hardware *hw, 763static void handle_received_CTRL_packet(struct ipw_hardware *hw,
762 unsigned int channel_idx, 764 unsigned int channel_idx,
763 unsigned char *data, int len) 765 const unsigned char *data, int len)
764{ 766{
765 struct ipw_control_packet_body *body = 767 const struct ipw_control_packet_body *body =
766 (struct ipw_control_packet_body *) data; 768 (const struct ipw_control_packet_body *) data;
767 unsigned int changed_mask; 769 unsigned int changed_mask;
768 770
769 if (len != sizeof(struct ipw_control_packet_body)) { 771 if (len != sizeof(struct ipw_control_packet_body)) {
@@ -805,13 +807,13 @@ static void handle_received_CTRL_packet(struct ipw_hardware *hw,
805} 807}
806 808
807static void handle_received_packet(struct ipw_hardware *hw, 809static void handle_received_packet(struct ipw_hardware *hw,
808 union nl_packet *packet, 810 const union nl_packet *packet,
809 unsigned short len) 811 unsigned short len)
810{ 812{
811 unsigned int protocol = packet->hdr.protocol; 813 unsigned int protocol = packet->hdr.protocol;
812 unsigned int address = packet->hdr.address; 814 unsigned int address = packet->hdr.address;
813 unsigned int header_length; 815 unsigned int header_length;
814 unsigned char *data; 816 const unsigned char *data;
815 unsigned int data_len; 817 unsigned int data_len;
816 int is_last = packet->hdr.packet_rank & NL_LAST_PACKET; 818 int is_last = packet->hdr.packet_rank & NL_LAST_PACKET;
817 819
@@ -1288,7 +1290,7 @@ static void *alloc_ctrl_packet(int header_size,
1288} 1290}
1289 1291
1290int ipwireless_send_packet(struct ipw_hardware *hw, unsigned int channel_idx, 1292int ipwireless_send_packet(struct ipw_hardware *hw, unsigned int channel_idx,
1291 unsigned char *data, unsigned int length, 1293 const unsigned char *data, unsigned int length,
1292 void (*callback) (void *cb, unsigned int length), 1294 void (*callback) (void *cb, unsigned int length),
1293 void *callback_data) 1295 void *callback_data)
1294{ 1296{
@@ -1522,10 +1524,10 @@ static void ipw_send_setup_packet(struct ipw_hardware *hw)
1522 1524
1523static void handle_received_SETUP_packet(struct ipw_hardware *hw, 1525static void handle_received_SETUP_packet(struct ipw_hardware *hw,
1524 unsigned int address, 1526 unsigned int address,
1525 unsigned char *data, int len, 1527 const unsigned char *data, int len,
1526 int is_last) 1528 int is_last)
1527{ 1529{
1528 union ipw_setup_rx_msg *rx_msg = (union ipw_setup_rx_msg *) data; 1530 const union ipw_setup_rx_msg *rx_msg = (const union ipw_setup_rx_msg *) data;
1529 1531
1530 if (address != ADDR_SETUP_PROT) { 1532 if (address != ADDR_SETUP_PROT) {
1531 printk(KERN_INFO IPWIRELESS_PCCARD_NAME 1533 printk(KERN_INFO IPWIRELESS_PCCARD_NAME
diff --git a/drivers/char/pcmcia/ipwireless/hardware.h b/drivers/char/pcmcia/ipwireless/hardware.h
index e21d23a922ac..90a8590e43b0 100644
--- a/drivers/char/pcmcia/ipwireless/hardware.h
+++ b/drivers/char/pcmcia/ipwireless/hardware.h
@@ -41,7 +41,7 @@ int ipwireless_set_RTS(struct ipw_hardware *hw, unsigned int channel_idx,
41 int state); 41 int state);
42int ipwireless_send_packet(struct ipw_hardware *hw, 42int ipwireless_send_packet(struct ipw_hardware *hw,
43 unsigned int channel_idx, 43 unsigned int channel_idx,
44 unsigned char *data, 44 const unsigned char *data,
45 unsigned int length, 45 unsigned int length,
46 void (*packet_sent_callback) (void *cb, 46 void (*packet_sent_callback) (void *cb,
47 unsigned int length), 47 unsigned int length),
diff --git a/drivers/char/pcmcia/ipwireless/tty.c b/drivers/char/pcmcia/ipwireless/tty.c
index 42f3815c5ce3..b1414507997c 100644
--- a/drivers/char/pcmcia/ipwireless/tty.c
+++ b/drivers/char/pcmcia/ipwireless/tty.c
@@ -259,7 +259,7 @@ static int ipw_write(struct tty_struct *linux_tty,
259 } 259 }
260 260
261 ret = ipwireless_send_packet(tty->hardware, IPW_CHANNEL_RAS, 261 ret = ipwireless_send_packet(tty->hardware, IPW_CHANNEL_RAS,
262 (unsigned char *) buf, count, 262 buf, count,
263 ipw_write_packet_sent_callback, tty); 263 ipw_write_packet_sent_callback, tty);
264 if (ret == -1) { 264 if (ret == -1) {
265 mutex_unlock(&tty->ipw_tty_mutex); 265 mutex_unlock(&tty->ipw_tty_mutex);