Commit:     c018664c51aca418e16bc83f75257c68250fb052
Parent:     a95e23a27b33db5d5f40278b16a42e5e20188015
Author:     Jean Delvare <[EMAIL PROTECTED]>
AuthorDate: Tue Oct 16 01:28:18 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Tue Oct 16 09:43:13 2007 -0700

    rtc-pcf8583: Check for i2c adapter functionality
    Not all i2c adapters support I2C-level messaging.  Check that the adapter
    does before probing for a PCF8583 chip, as the driver makes use of
    i2c_transfer and i2c_master_send.
    Signed-off-by: Jean Delvare <[EMAIL PROTECTED]>
    Signed-off-by: Alessandro Zummo <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
 drivers/rtc/rtc-pcf8583.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/rtc/rtc-pcf8583.c b/drivers/rtc/rtc-pcf8583.c
index d48b033..556d0e7 100644
--- a/drivers/rtc/rtc-pcf8583.c
+++ b/drivers/rtc/rtc-pcf8583.c
@@ -332,6 +332,9 @@ static int pcf8583_probe(struct i2c_adapter *adap, int 
addr, int kind)
+       if (!i2c_check_functionality(adap, I2C_FUNC_I2C))
+               return 0;
        pcf = kzalloc(sizeof(*pcf), GFP_KERNEL);
        if (!pcf)
                return -ENOMEM;
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to