diff options
author | Steve French <sfrench@us.ibm.com> | 2011-12-16 01:39:20 -0500 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2011-12-16 01:39:20 -0500 |
commit | aaf015890754d58dcb71a4aa44ed246bb082bcf6 (patch) | |
tree | 17b51ff707fd1b3efec3a3ab872f0d7a7416aca5 /drivers/gpio/gpio-pca953x.c | |
parent | 9c32c63bb70b2fafc3b18bee29959c3bf245ceba (diff) | |
parent | 8def5f51b012efb00e77ba2d04696cc0aadd0609 (diff) |
Merge branch 'master' of git+ssh://git.samba.org/data/git/sfrench/cifs-2.6
Diffstat (limited to 'drivers/gpio/gpio-pca953x.c')
-rw-r--r-- | drivers/gpio/gpio-pca953x.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/gpio/gpio-pca953x.c b/drivers/gpio/gpio-pca953x.c index 0550dcb85814..d3f3e8f54561 100644 --- a/drivers/gpio/gpio-pca953x.c +++ b/drivers/gpio/gpio-pca953x.c | |||
@@ -546,7 +546,7 @@ static void pca953x_irq_teardown(struct pca953x_chip *chip) | |||
546 | * Translate OpenFirmware node properties into platform_data | 546 | * Translate OpenFirmware node properties into platform_data |
547 | * WARNING: This is DEPRECATED and will be removed eventually! | 547 | * WARNING: This is DEPRECATED and will be removed eventually! |
548 | */ | 548 | */ |
549 | void | 549 | static void |
550 | pca953x_get_alt_pdata(struct i2c_client *client, int *gpio_base, int *invert) | 550 | pca953x_get_alt_pdata(struct i2c_client *client, int *gpio_base, int *invert) |
551 | { | 551 | { |
552 | struct device_node *node; | 552 | struct device_node *node; |
@@ -574,7 +574,7 @@ pca953x_get_alt_pdata(struct i2c_client *client, int *gpio_base, int *invert) | |||
574 | *invert = *val; | 574 | *invert = *val; |
575 | } | 575 | } |
576 | #else | 576 | #else |
577 | void | 577 | static void |
578 | pca953x_get_alt_pdata(struct i2c_client *client, int *gpio_base, int *invert) | 578 | pca953x_get_alt_pdata(struct i2c_client *client, int *gpio_base, int *invert) |
579 | { | 579 | { |
580 | *gpio_base = -1; | 580 | *gpio_base = -1; |
@@ -596,9 +596,6 @@ static int __devinit device_pca953x_init(struct pca953x_chip *chip, int invert) | |||
596 | 596 | ||
597 | /* set platform specific polarity inversion */ | 597 | /* set platform specific polarity inversion */ |
598 | ret = pca953x_write_reg(chip, PCA953X_INVERT, invert); | 598 | ret = pca953x_write_reg(chip, PCA953X_INVERT, invert); |
599 | if (ret) | ||
600 | goto out; | ||
601 | return 0; | ||
602 | out: | 599 | out: |
603 | return ret; | 600 | return ret; |
604 | } | 601 | } |
@@ -640,7 +637,7 @@ static int __devinit pca953x_probe(struct i2c_client *client, | |||
640 | struct pca953x_platform_data *pdata; | 637 | struct pca953x_platform_data *pdata; |
641 | struct pca953x_chip *chip; | 638 | struct pca953x_chip *chip; |
642 | int irq_base=0, invert=0; | 639 | int irq_base=0, invert=0; |
643 | int ret = 0; | 640 | int ret; |
644 | 641 | ||
645 | chip = kzalloc(sizeof(struct pca953x_chip), GFP_KERNEL); | 642 | chip = kzalloc(sizeof(struct pca953x_chip), GFP_KERNEL); |
646 | if (chip == NULL) | 643 | if (chip == NULL) |
@@ -673,10 +670,10 @@ static int __devinit pca953x_probe(struct i2c_client *client, | |||
673 | pca953x_setup_gpio(chip, id->driver_data & PCA_GPIO_MASK); | 670 | pca953x_setup_gpio(chip, id->driver_data & PCA_GPIO_MASK); |
674 | 671 | ||
675 | if (chip->chip_type == PCA953X_TYPE) | 672 | if (chip->chip_type == PCA953X_TYPE) |
676 | device_pca953x_init(chip, invert); | 673 | ret = device_pca953x_init(chip, invert); |
677 | else if (chip->chip_type == PCA957X_TYPE) | ||
678 | device_pca957x_init(chip, invert); | ||
679 | else | 674 | else |
675 | ret = device_pca957x_init(chip, invert); | ||
676 | if (ret) | ||
680 | goto out_failed; | 677 | goto out_failed; |
681 | 678 | ||
682 | ret = pca953x_irq_setup(chip, id, irq_base); | 679 | ret = pca953x_irq_setup(chip, id, irq_base); |