gpio: pca953x: remove unneeded check for chip type
authorWolfram Sang <w.sang@pengutronix.de>
Fri, 14 Oct 2011 13:31:59 +0000 (15:31 +0200)
committerGrant Likely <grant.likely@secretlab.ca>
Sat, 29 Oct 2011 10:26:29 +0000 (12:26 +0200)
We can assume our own device_id table is correct, so remove checking if
the chip type is valid. (The check was bogus anyway: If it found an
invalid entry, it returned with 0!) This is in preparation for further
cleanups.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Cc: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
drivers/gpio/gpio-pca953x.c

index c43b8ff626a73900b4242833492654de49addf65..45de6a4ac632ace5f6cf592a11c8c48aca2ad8a9 100644 (file)
@@ -673,10 +673,8 @@ static int __devinit pca953x_probe(struct i2c_client *client,
 
        if (chip->chip_type == PCA953X_TYPE)
                device_pca953x_init(chip, invert);
-       else if (chip->chip_type == PCA957X_TYPE)
-               device_pca957x_init(chip, invert);
        else
-               goto out_failed;
+               device_pca957x_init(chip, invert);
 
        ret = pca953x_irq_setup(chip, id, irq_base);
        if (ret)