aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/w1/ds_w1_bridge.c
diff options
context:
space:
mode:
authorEvgeniy Polyakov <johnpol@2ka.mipt.ru>2005-12-06 05:38:27 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2006-03-23 20:28:11 -0500
commitccd6994000fb6d08ee1be8a7fa20c8d602a2267d (patch)
tree88badd14da5f2c0593a88a351db6a664c3b6fbb8 /drivers/w1/ds_w1_bridge.c
parenta1a051b1870f9e4607526c7e403abab06526c6d9 (diff)
[PATCH] W1: Change the type 'unsigned long' member of 'struct w1_bus_master' to 'void *'.
Signed-off-by: Ben Gardner <bgardner@wabtec.com> Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/w1/ds_w1_bridge.c')
-rw-r--r--drivers/w1/ds_w1_bridge.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/drivers/w1/ds_w1_bridge.c b/drivers/w1/ds_w1_bridge.c
index a79d16d5666f..29e01d57c6be 100644
--- a/drivers/w1/ds_w1_bridge.c
+++ b/drivers/w1/ds_w1_bridge.c
@@ -29,10 +29,10 @@
29static struct ds_device *ds_dev; 29static struct ds_device *ds_dev;
30static struct w1_bus_master *ds_bus_master; 30static struct w1_bus_master *ds_bus_master;
31 31
32static u8 ds9490r_touch_bit(unsigned long data, u8 bit) 32static u8 ds9490r_touch_bit(void *data, u8 bit)
33{ 33{
34 u8 ret; 34 u8 ret;
35 struct ds_device *dev = (struct ds_device *)data; 35 struct ds_device *dev = data;
36 36
37 if (ds_touch_bit(dev, bit, &ret)) 37 if (ds_touch_bit(dev, bit, &ret))
38 return 0; 38 return 0;
@@ -40,23 +40,23 @@ static u8 ds9490r_touch_bit(unsigned long data, u8 bit)
40 return ret; 40 return ret;
41} 41}
42 42
43static void ds9490r_write_bit(unsigned long data, u8 bit) 43static void ds9490r_write_bit(void *data, u8 bit)
44{ 44{
45 struct ds_device *dev = (struct ds_device *)data; 45 struct ds_device *dev = data;
46 46
47 ds_write_bit(dev, bit); 47 ds_write_bit(dev, bit);
48} 48}
49 49
50static void ds9490r_write_byte(unsigned long data, u8 byte) 50static void ds9490r_write_byte(void *data, u8 byte)
51{ 51{
52 struct ds_device *dev = (struct ds_device *)data; 52 struct ds_device *dev = data;
53 53
54 ds_write_byte(dev, byte); 54 ds_write_byte(dev, byte);
55} 55}
56 56
57static u8 ds9490r_read_bit(unsigned long data) 57static u8 ds9490r_read_bit(void *data)
58{ 58{
59 struct ds_device *dev = (struct ds_device *)data; 59 struct ds_device *dev = data;
60 int err; 60 int err;
61 u8 bit = 0; 61 u8 bit = 0;
62 62
@@ -70,9 +70,9 @@ static u8 ds9490r_read_bit(unsigned long data)
70 return bit & 1; 70 return bit & 1;
71} 71}
72 72
73static u8 ds9490r_read_byte(unsigned long data) 73static u8 ds9490r_read_byte(void *data)
74{ 74{
75 struct ds_device *dev = (struct ds_device *)data; 75 struct ds_device *dev = data;
76 int err; 76 int err;
77 u8 byte = 0; 77 u8 byte = 0;
78 78
@@ -83,16 +83,16 @@ static u8 ds9490r_read_byte(unsigned long data)
83 return byte; 83 return byte;
84} 84}
85 85
86static void ds9490r_write_block(unsigned long data, const u8 *buf, int len) 86static void ds9490r_write_block(void *data, const u8 *buf, int len)
87{ 87{
88 struct ds_device *dev = (struct ds_device *)data; 88 struct ds_device *dev = data;
89 89
90 ds_write_block(dev, (u8 *)buf, len); 90 ds_write_block(dev, (u8 *)buf, len);
91} 91}
92 92
93static u8 ds9490r_read_block(unsigned long data, u8 *buf, int len) 93static u8 ds9490r_read_block(void *data, u8 *buf, int len)
94{ 94{
95 struct ds_device *dev = (struct ds_device *)data; 95 struct ds_device *dev = data;
96 int err; 96 int err;
97 97
98 err = ds_read_block(dev, buf, len); 98 err = ds_read_block(dev, buf, len);
@@ -102,9 +102,9 @@ static u8 ds9490r_read_block(unsigned long data, u8 *buf, int len)
102 return len; 102 return len;
103} 103}
104 104
105static u8 ds9490r_reset(unsigned long data) 105static u8 ds9490r_reset(void *data)
106{ 106{
107 struct ds_device *dev = (struct ds_device *)data; 107 struct ds_device *dev = data;
108 struct ds_status st; 108 struct ds_status st;
109 int err; 109 int err;
110 110
@@ -136,7 +136,7 @@ static int __devinit ds_w1_init(void)
136 136
137 memset(ds_bus_master, 0, sizeof(*ds_bus_master)); 137 memset(ds_bus_master, 0, sizeof(*ds_bus_master));
138 138
139 ds_bus_master->data = (unsigned long)ds_dev; 139 ds_bus_master->data = ds_dev;
140 ds_bus_master->touch_bit = &ds9490r_touch_bit; 140 ds_bus_master->touch_bit = &ds9490r_touch_bit;
141 ds_bus_master->read_bit = &ds9490r_read_bit; 141 ds_bus_master->read_bit = &ds9490r_read_bit;
142 ds_bus_master->write_bit = &ds9490r_write_bit; 142 ds_bus_master->write_bit = &ds9490r_write_bit;