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 /drivers/rtc/rtc-x1205.c | |
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>
Diffstat (limited to 'drivers/rtc/rtc-x1205.c')
-rw-r--r-- | drivers/rtc/rtc-x1205.c | 10 |
1 files changed, 5 insertions, 5 deletions
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; |