aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/w1
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/w1')
-rw-r--r--drivers/w1/masters/ds1wm.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/w1/masters/ds1wm.c b/drivers/w1/masters/ds1wm.c
index 78a14dacb8ec..10211e493001 100644
--- a/drivers/w1/masters/ds1wm.c
+++ b/drivers/w1/masters/ds1wm.c
@@ -103,12 +103,12 @@ struct ds1wm_data {
103static inline void ds1wm_write_register(struct ds1wm_data *ds1wm_data, u32 reg, 103static inline void ds1wm_write_register(struct ds1wm_data *ds1wm_data, u32 reg,
104 u8 val) 104 u8 val)
105{ 105{
106 __raw_writeb(val, ds1wm_data->map + (reg << ds1wm_data->bus_shift)); 106 __raw_writeb(val, ds1wm_data->map + (reg << ds1wm_data->bus_shift));
107} 107}
108 108
109static inline u8 ds1wm_read_register(struct ds1wm_data *ds1wm_data, u32 reg) 109static inline u8 ds1wm_read_register(struct ds1wm_data *ds1wm_data, u32 reg)
110{ 110{
111 return __raw_readb(ds1wm_data->map + (reg << ds1wm_data->bus_shift)); 111 return __raw_readb(ds1wm_data->map + (reg << ds1wm_data->bus_shift));
112} 112}
113 113
114 114
@@ -150,8 +150,8 @@ static int ds1wm_reset(struct ds1wm_data *ds1wm_data)
150 timeleft = wait_for_completion_timeout(&reset_done, DS1WM_TIMEOUT); 150 timeleft = wait_for_completion_timeout(&reset_done, DS1WM_TIMEOUT);
151 ds1wm_data->reset_complete = NULL; 151 ds1wm_data->reset_complete = NULL;
152 if (!timeleft) { 152 if (!timeleft) {
153 dev_dbg(&ds1wm_data->pdev->dev, "reset failed\n"); 153 dev_err(&ds1wm_data->pdev->dev, "reset failed\n");
154 return 1; 154 return 1;
155 } 155 }
156 156
157 /* Wait for the end of the reset. According to the specs, the time 157 /* Wait for the end of the reset. According to the specs, the time
@@ -168,11 +168,11 @@ static int ds1wm_reset(struct ds1wm_data *ds1wm_data)
168 (ds1wm_data->active_high ? DS1WM_INTEN_IAS : 0)); 168 (ds1wm_data->active_high ? DS1WM_INTEN_IAS : 0));
169 169
170 if (!ds1wm_data->slave_present) { 170 if (!ds1wm_data->slave_present) {
171 dev_dbg(&ds1wm_data->pdev->dev, "reset: no devices found\n"); 171 dev_dbg(&ds1wm_data->pdev->dev, "reset: no devices found\n");
172 return 1; 172 return 1;
173 } 173 }
174 174
175 return 0; 175 return 0;
176} 176}
177 177
178static int ds1wm_write(struct ds1wm_data *ds1wm_data, u8 data) 178static int ds1wm_write(struct ds1wm_data *ds1wm_data, u8 data)
@@ -335,7 +335,7 @@ static int ds1wm_probe(struct platform_device *pdev)
335 if (!pdev) 335 if (!pdev)
336 return -ENODEV; 336 return -ENODEV;
337 337
338 ds1wm_data = kzalloc(sizeof (*ds1wm_data), GFP_KERNEL); 338 ds1wm_data = kzalloc(sizeof(*ds1wm_data), GFP_KERNEL);
339 if (!ds1wm_data) 339 if (!ds1wm_data)
340 return -ENOMEM; 340 return -ENOMEM;
341 341