aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/w1/ds_w1_bridge.c34
-rw-r--r--drivers/w1/matrox_w1.c14
-rw-r--r--drivers/w1/w1.c8
-rw-r--r--drivers/w1/w1.h24
4 files changed, 40 insertions, 40 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;
diff --git a/drivers/w1/matrox_w1.c b/drivers/w1/matrox_w1.c
index 0b03f8f93f63..750a1aacf6f5 100644
--- a/drivers/w1/matrox_w1.c
+++ b/drivers/w1/matrox_w1.c
@@ -90,8 +90,8 @@ struct matrox_device
90 struct w1_bus_master *bus_master; 90 struct w1_bus_master *bus_master;
91}; 91};
92 92
93static u8 matrox_w1_read_ddc_bit(unsigned long); 93static u8 matrox_w1_read_ddc_bit(void *);
94static void matrox_w1_write_ddc_bit(unsigned long, u8); 94static void matrox_w1_write_ddc_bit(void *, u8);
95 95
96/* 96/*
97 * These functions read and write DDC Data bit. 97 * These functions read and write DDC Data bit.
@@ -122,10 +122,10 @@ static __inline__ void matrox_w1_write_reg(struct matrox_device *dev, u8 reg, u8
122 wmb(); 122 wmb();
123} 123}
124 124
125static void matrox_w1_write_ddc_bit(unsigned long data, u8 bit) 125static void matrox_w1_write_ddc_bit(void *data, u8 bit)
126{ 126{
127 u8 ret; 127 u8 ret;
128 struct matrox_device *dev = (struct matrox_device *) data; 128 struct matrox_device *dev = data;
129 129
130 if (bit) 130 if (bit)
131 bit = 0; 131 bit = 0;
@@ -137,10 +137,10 @@ static void matrox_w1_write_ddc_bit(unsigned long data, u8 bit)
137 matrox_w1_write_reg(dev, MATROX_GET_DATA, 0x00); 137 matrox_w1_write_reg(dev, MATROX_GET_DATA, 0x00);
138} 138}
139 139
140static u8 matrox_w1_read_ddc_bit(unsigned long data) 140static u8 matrox_w1_read_ddc_bit(void *data)
141{ 141{
142 u8 ret; 142 u8 ret;
143 struct matrox_device *dev = (struct matrox_device *) data; 143 struct matrox_device *dev = data;
144 144
145 ret = matrox_w1_read_reg(dev, MATROX_GET_DATA); 145 ret = matrox_w1_read_reg(dev, MATROX_GET_DATA);
146 146
@@ -198,7 +198,7 @@ static int __devinit matrox_w1_probe(struct pci_dev *pdev, const struct pci_devi
198 198
199 matrox_w1_hw_init(dev); 199 matrox_w1_hw_init(dev);
200 200
201 dev->bus_master->data = (unsigned long) dev; 201 dev->bus_master->data = dev;
202 dev->bus_master->read_bit = &matrox_w1_read_ddc_bit; 202 dev->bus_master->read_bit = &matrox_w1_read_ddc_bit;
203 dev->bus_master->write_bit = &matrox_w1_write_ddc_bit; 203 dev->bus_master->write_bit = &matrox_w1_write_ddc_bit;
204 204
diff --git a/drivers/w1/w1.c b/drivers/w1/w1.c
index 024206c4a0e4..f0b47fe4ed25 100644
--- a/drivers/w1/w1.c
+++ b/drivers/w1/w1.c
@@ -552,7 +552,7 @@ static void w1_slave_detach(struct w1_slave *sl)
552 kfree(sl); 552 kfree(sl);
553} 553}
554 554
555static struct w1_master *w1_search_master(unsigned long data) 555static struct w1_master *w1_search_master(void *data)
556{ 556{
557 struct w1_master *dev; 557 struct w1_master *dev;
558 int found = 0; 558 int found = 0;
@@ -583,7 +583,7 @@ void w1_reconnect_slaves(struct w1_family *f)
583 spin_unlock_bh(&w1_mlock); 583 spin_unlock_bh(&w1_mlock);
584} 584}
585 585
586static void w1_slave_found(unsigned long data, u64 rn) 586static void w1_slave_found(void *data, u64 rn)
587{ 587{
588 int slave_count; 588 int slave_count;
589 struct w1_slave *sl; 589 struct w1_slave *sl;
@@ -595,8 +595,8 @@ static void w1_slave_found(unsigned long data, u64 rn)
595 595
596 dev = w1_search_master(data); 596 dev = w1_search_master(data);
597 if (!dev) { 597 if (!dev) {
598 printk(KERN_ERR "Failed to find w1 master device for data %08lx, it is impossible.\n", 598 printk(KERN_ERR "Failed to find w1 master device for data %p, "
599 data); 599 "it is impossible.\n", data);
600 return; 600 return;
601 } 601 }
602 602
diff --git a/drivers/w1/w1.h b/drivers/w1/w1.h
index d8900780c3bf..b62e771e5709 100644
--- a/drivers/w1/w1.h
+++ b/drivers/w1/w1.h
@@ -80,7 +80,7 @@ struct w1_slave
80 struct completion released; 80 struct completion released;
81}; 81};
82 82
83typedef void (* w1_slave_found_callback)(unsigned long, u64); 83typedef void (* w1_slave_found_callback)(void *, u64);
84 84
85 85
86/** 86/**
@@ -93,16 +93,16 @@ typedef void (* w1_slave_found_callback)(unsigned long, u64);
93struct w1_bus_master 93struct w1_bus_master
94{ 94{
95 /** the first parameter in all the functions below */ 95 /** the first parameter in all the functions below */
96 unsigned long data; 96 void *data;
97 97
98 /** 98 /**
99 * Sample the line level 99 * Sample the line level
100 * @return the level read (0 or 1) 100 * @return the level read (0 or 1)
101 */ 101 */
102 u8 (*read_bit)(unsigned long); 102 u8 (*read_bit)(void *);
103 103
104 /** Sets the line level */ 104 /** Sets the line level */
105 void (*write_bit)(unsigned long, u8); 105 void (*write_bit)(void *, u8);
106 106
107 /** 107 /**
108 * touch_bit is the lowest-level function for devices that really 108 * touch_bit is the lowest-level function for devices that really
@@ -111,42 +111,42 @@ struct w1_bus_master
111 * touch_bit(1) = write-1 / read cycle 111 * touch_bit(1) = write-1 / read cycle
112 * @return the bit read (0 or 1) 112 * @return the bit read (0 or 1)
113 */ 113 */
114 u8 (*touch_bit)(unsigned long, u8); 114 u8 (*touch_bit)(void *, u8);
115 115
116 /** 116 /**
117 * Reads a bytes. Same as 8 touch_bit(1) calls. 117 * Reads a bytes. Same as 8 touch_bit(1) calls.
118 * @return the byte read 118 * @return the byte read
119 */ 119 */
120 u8 (*read_byte)(unsigned long); 120 u8 (*read_byte)(void *);
121 121
122 /** 122 /**
123 * Writes a byte. Same as 8 touch_bit(x) calls. 123 * Writes a byte. Same as 8 touch_bit(x) calls.
124 */ 124 */
125 void (*write_byte)(unsigned long, u8); 125 void (*write_byte)(void *, u8);
126 126
127 /** 127 /**
128 * Same as a series of read_byte() calls 128 * Same as a series of read_byte() calls
129 * @return the number of bytes read 129 * @return the number of bytes read
130 */ 130 */
131 u8 (*read_block)(unsigned long, u8 *, int); 131 u8 (*read_block)(void *, u8 *, int);
132 132
133 /** Same as a series of write_byte() calls */ 133 /** Same as a series of write_byte() calls */
134 void (*write_block)(unsigned long, const u8 *, int); 134 void (*write_block)(void *, const u8 *, int);
135 135
136 /** 136 /**
137 * Combines two reads and a smart write for ROM searches 137 * Combines two reads and a smart write for ROM searches
138 * @return bit0=Id bit1=comp_id bit2=dir_taken 138 * @return bit0=Id bit1=comp_id bit2=dir_taken
139 */ 139 */
140 u8 (*triplet)(unsigned long, u8); 140 u8 (*triplet)(void *, u8);
141 141
142 /** 142 /**
143 * long write-0 with a read for the presence pulse detection 143 * long write-0 with a read for the presence pulse detection
144 * @return -1=Error, 0=Device present, 1=No device present 144 * @return -1=Error, 0=Device present, 1=No device present
145 */ 145 */
146 u8 (*reset_bus)(unsigned long); 146 u8 (*reset_bus)(void *);
147 147
148 /** Really nice hardware can handles the ROM searches */ 148 /** Really nice hardware can handles the ROM searches */
149 void (*search)(unsigned long, w1_slave_found_callback); 149 void (*search)(void *, w1_slave_found_callback);
150}; 150};
151 151
152#define W1_MASTER_NEED_EXIT 0 152#define W1_MASTER_NEED_EXIT 0