+ /* If no function is properly configured, there's no point in
+ actually registering the chip. */
+ fan1 = (smsc47m1_read_value(new_client, SMSC47M1_REG_TPIN(0)) & 0x05)
+ == 0x05;
+ fan2 = (smsc47m1_read_value(new_client, SMSC47M1_REG_TPIN(1)) & 0x05)
+ == 0x05;
+ pwm1 = (smsc47m1_read_value(new_client, SMSC47M1_REG_PPIN(0)) & 0x05)
+ == 0x04;
+ pwm2 = (smsc47m1_read_value(new_client, SMSC47M1_REG_PPIN(1)) & 0x05)
+ == 0x04;
+ if (!(fan1 || fan2 || pwm1 || pwm2)) {
+ dev_warn(&new_client->dev, "Device is not configured, will not use\n");
+ err = -ENODEV;
+ goto error_free;
+ }
+