]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/rtc/rtc-pcf8583.c
splice: always updated atime in direct splice
[linux-2.6-omap-h63xx.git] / drivers / rtc / rtc-pcf8583.c
index d48b033745868bb28f801b957dc874d3328acd78..c973ba94c422bc182c8b994dfd877dac967030bc 100644 (file)
@@ -40,7 +40,7 @@ struct pcf8583 {
 #define CTRL_ALARM     0x02
 #define CTRL_TIMER     0x01
 
-static unsigned short normal_i2c[] = { 0x50, I2C_CLIENT_END };
+static const unsigned short normal_i2c[] = { 0x50, I2C_CLIENT_END };
 
 /* Module parameters */
 I2C_CLIENT_INSMOD;
@@ -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;