diff options
author | David Brownell <david-b@pacbell.net> | 2006-12-10 05:19:02 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-10 12:55:40 -0500 |
commit | a14e18935076ce084c4edbc57883f38e642c8e5d (patch) | |
tree | c35e51c304aa3bb410d8dcba150254d156f1394f | |
parent | 884b4aaaa242a2db8c8252796f0118164a680ab5 (diff) |
[PATCH] RTCs don't use i2c_adapter.dev
Update more I2C drivers that live outside drivers/i2c to understand that using
adapter->dev is not The Way. When actually referring to the adapter hardware,
adapter->class_dev.dev is the answer. When referring to a device connected to
it, client->dev.dev is the answer.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | drivers/rtc/rtc-ds1672.c | 2 | ||||
-rw-r--r-- | drivers/rtc/rtc-pcf8563.c | 6 | ||||
-rw-r--r-- | drivers/rtc/rtc-rs5c372.c | 2 | ||||
-rw-r--r-- | drivers/rtc/rtc-x1205.c | 10 |
4 files changed, 10 insertions, 10 deletions
diff --git a/drivers/rtc/rtc-ds1672.c b/drivers/rtc/rtc-ds1672.c index dfef1637bfb8..205fa28593b7 100644 --- a/drivers/rtc/rtc-ds1672.c +++ b/drivers/rtc/rtc-ds1672.c | |||
@@ -199,7 +199,7 @@ static int ds1672_probe(struct i2c_adapter *adapter, int address, int kind) | |||
199 | struct i2c_client *client; | 199 | struct i2c_client *client; |
200 | struct rtc_device *rtc; | 200 | struct rtc_device *rtc; |
201 | 201 | ||
202 | dev_dbg(&adapter->dev, "%s\n", __FUNCTION__); | 202 | dev_dbg(adapter->class_dev.dev, "%s\n", __FUNCTION__); |
203 | 203 | ||
204 | if (!i2c_check_functionality(adapter, I2C_FUNC_I2C)) { | 204 | if (!i2c_check_functionality(adapter, I2C_FUNC_I2C)) { |
205 | err = -ENODEV; | 205 | err = -ENODEV; |
diff --git a/drivers/rtc/rtc-pcf8563.c b/drivers/rtc/rtc-pcf8563.c index a760cf69af90..4b72b8ef5d66 100644 --- a/drivers/rtc/rtc-pcf8563.c +++ b/drivers/rtc/rtc-pcf8563.c | |||
@@ -192,7 +192,7 @@ static int pcf8563_validate_client(struct i2c_client *client) | |||
192 | xfer = i2c_transfer(client->adapter, msgs, ARRAY_SIZE(msgs)); | 192 | xfer = i2c_transfer(client->adapter, msgs, ARRAY_SIZE(msgs)); |
193 | 193 | ||
194 | if (xfer != ARRAY_SIZE(msgs)) { | 194 | if (xfer != ARRAY_SIZE(msgs)) { |
195 | dev_err(&client->adapter->dev, | 195 | dev_err(&client->dev, |
196 | "%s: could not read register 0x%02X\n", | 196 | "%s: could not read register 0x%02X\n", |
197 | __FUNCTION__, pattern[i].reg); | 197 | __FUNCTION__, pattern[i].reg); |
198 | 198 | ||
@@ -203,7 +203,7 @@ static int pcf8563_validate_client(struct i2c_client *client) | |||
203 | 203 | ||
204 | if (value > pattern[i].max || | 204 | if (value > pattern[i].max || |
205 | value < pattern[i].min) { | 205 | value < pattern[i].min) { |
206 | dev_dbg(&client->adapter->dev, | 206 | dev_dbg(&client->dev, |
207 | "%s: pattern=%d, reg=%x, mask=0x%02x, min=%d, " | 207 | "%s: pattern=%d, reg=%x, mask=0x%02x, min=%d, " |
208 | "max=%d, value=%d, raw=0x%02X\n", | 208 | "max=%d, value=%d, raw=0x%02X\n", |
209 | __FUNCTION__, i, pattern[i].reg, pattern[i].mask, | 209 | __FUNCTION__, i, pattern[i].reg, pattern[i].mask, |
@@ -253,7 +253,7 @@ static int pcf8563_probe(struct i2c_adapter *adapter, int address, int kind) | |||
253 | 253 | ||
254 | int err = 0; | 254 | int err = 0; |
255 | 255 | ||
256 | dev_dbg(&adapter->dev, "%s\n", __FUNCTION__); | 256 | dev_dbg(adapter->class_dev.dev, "%s\n", __FUNCTION__); |
257 | 257 | ||
258 | if (!i2c_check_functionality(adapter, I2C_FUNC_I2C)) { | 258 | if (!i2c_check_functionality(adapter, I2C_FUNC_I2C)) { |
259 | err = -ENODEV; | 259 | err = -ENODEV; |
diff --git a/drivers/rtc/rtc-rs5c372.c b/drivers/rtc/rtc-rs5c372.c index e2c7698fdba3..1460f6b769f2 100644 --- a/drivers/rtc/rtc-rs5c372.c +++ b/drivers/rtc/rtc-rs5c372.c | |||
@@ -200,7 +200,7 @@ static int rs5c372_probe(struct i2c_adapter *adapter, int address, int kind) | |||
200 | struct i2c_client *client; | 200 | struct i2c_client *client; |
201 | struct rs5c372 *rs5c372; | 201 | struct rs5c372 *rs5c372; |
202 | 202 | ||
203 | dev_dbg(&adapter->dev, "%s\n", __FUNCTION__); | 203 | dev_dbg(adapter->class_dev.dev, "%s\n", __FUNCTION__); |
204 | 204 | ||
205 | if (!i2c_check_functionality(adapter, I2C_FUNC_I2C)) { | 205 | if (!i2c_check_functionality(adapter, I2C_FUNC_I2C)) { |
206 | err = -ENODEV; | 206 | err = -ENODEV; |
diff --git a/drivers/rtc/rtc-x1205.c b/drivers/rtc/rtc-x1205.c index 9a67487d086b..019ae255b0c8 100644 --- a/drivers/rtc/rtc-x1205.c +++ b/drivers/rtc/rtc-x1205.c | |||
@@ -372,7 +372,7 @@ static int x1205_validate_client(struct i2c_client *client) | |||
372 | }; | 372 | }; |
373 | 373 | ||
374 | if ((xfer = i2c_transfer(client->adapter, msgs, 2)) != 2) { | 374 | if ((xfer = i2c_transfer(client->adapter, msgs, 2)) != 2) { |
375 | dev_err(&client->adapter->dev, | 375 | dev_err(&client->dev, |
376 | "%s: could not read register %x\n", | 376 | "%s: could not read register %x\n", |
377 | __FUNCTION__, probe_zero_pattern[i]); | 377 | __FUNCTION__, probe_zero_pattern[i]); |
378 | 378 | ||
@@ -380,7 +380,7 @@ static int x1205_validate_client(struct i2c_client *client) | |||
380 | } | 380 | } |
381 | 381 | ||
382 | if ((buf & probe_zero_pattern[i+1]) != 0) { | 382 | if ((buf & probe_zero_pattern[i+1]) != 0) { |
383 | dev_err(&client->adapter->dev, | 383 | dev_err(&client->dev, |
384 | "%s: register=%02x, zero pattern=%d, value=%x\n", | 384 | "%s: register=%02x, zero pattern=%d, value=%x\n", |
385 | __FUNCTION__, probe_zero_pattern[i], i, buf); | 385 | __FUNCTION__, probe_zero_pattern[i], i, buf); |
386 | 386 | ||
@@ -400,7 +400,7 @@ static int x1205_validate_client(struct i2c_client *client) | |||
400 | }; | 400 | }; |
401 | 401 | ||
402 | if ((xfer = i2c_transfer(client->adapter, msgs, 2)) != 2) { | 402 | if ((xfer = i2c_transfer(client->adapter, msgs, 2)) != 2) { |
403 | dev_err(&client->adapter->dev, | 403 | dev_err(&client->dev, |
404 | "%s: could not read register %x\n", | 404 | "%s: could not read register %x\n", |
405 | __FUNCTION__, probe_limits_pattern[i].reg); | 405 | __FUNCTION__, probe_limits_pattern[i].reg); |
406 | 406 | ||
@@ -411,7 +411,7 @@ static int x1205_validate_client(struct i2c_client *client) | |||
411 | 411 | ||
412 | if (value > probe_limits_pattern[i].max || | 412 | if (value > probe_limits_pattern[i].max || |
413 | value < probe_limits_pattern[i].min) { | 413 | value < probe_limits_pattern[i].min) { |
414 | dev_dbg(&client->adapter->dev, | 414 | dev_dbg(&client->dev, |
415 | "%s: register=%x, lim pattern=%d, value=%d\n", | 415 | "%s: register=%x, lim pattern=%d, value=%d\n", |
416 | __FUNCTION__, probe_limits_pattern[i].reg, | 416 | __FUNCTION__, probe_limits_pattern[i].reg, |
417 | i, value); | 417 | i, value); |
@@ -506,7 +506,7 @@ static int x1205_probe(struct i2c_adapter *adapter, int address, int kind) | |||
506 | struct i2c_client *client; | 506 | struct i2c_client *client; |
507 | struct rtc_device *rtc; | 507 | struct rtc_device *rtc; |
508 | 508 | ||
509 | dev_dbg(&adapter->dev, "%s\n", __FUNCTION__); | 509 | dev_dbg(adapter->class_dev.dev, "%s\n", __FUNCTION__); |
510 | 510 | ||
511 | if (!i2c_check_functionality(adapter, I2C_FUNC_I2C)) { | 511 | if (!i2c_check_functionality(adapter, I2C_FUNC_I2C)) { |
512 | err = -ENODEV; | 512 | err = -ENODEV; |