Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6
[firefly-linux-kernel-4.4.55.git] / drivers / rtc / rtc-pcf8583.c
index d48b033745868bb28f801b957dc874d3328acd78..556d0e7da35bd04dc44df605ca22e77f95793d25 100644 (file)
@@ -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;