gpio: updates for v5.8 - part 2

- fix the initialization ordering in gpio-max730x
 - make gpio-pxa buildable for compile testing
 - make gpio-pca953x buildable as a module
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEFp3rbAvDxGAT0sefEacuoBRx13IFAl7ONccACgkQEacuoBRx
 13Kh/Q//bdyJU70HyvXI2240gXqcbblrXVx+BcBYIAxh61r2XdDOND9guUlsuT6+
 gE74fVA6ed1enjjFTkaNXiIsvHTPAG0ABz3nbXJ1dL27NBgItmfWM8EfjAJOCcA6
 z/kQkM8fooSoLtt2Zrdf5M3F2OyvJIgcVQm4JENqJKdJvd7T7xIKISr2UFAjNg/R
 ms/rD1IKsqu8Xegok1L85sC1nYSYxYKhGKZsWlG+HHl9NDWDo5CI6oxvf7YT0ePK
 dTxnM8ijY0NumLfiDJIwkdTAejnB1hJybrItojdmcwFhJmcckeNs9tIE4TM0wleH
 lsJZllmA7YfybPB2uvwCmoJYLK93+qFzehpquB+3pwV0VRTNYivscOkMW18JFdwC
 2VUgAIQeQ8g8HMnIYWjnPuudU/yYDu2iYyGZdaowxdo1W1i8Gn2BiyCawdmRDarl
 HpWwQByzynfOWSr5RjBHZ/G1tBQ4l8bjoCJFHsbFjOJTwquieSNx71OMhhysx1pp
 rb1t2r778zvihnl+JckvtLwZ8Vvf9iVYf81ZqXy9WIdJM1yECUensFWPHBxaCjz6
 7JjYertJNI5DL93+HwstKdl8DnIP3FZDGryPeqQVlXlUeWXHyyLSseuRc5OM1bVS
 CiJ/l2T+By5mek7qZ0kbTmVeTCvHHz7OCSExsN1/sAuz4eUFcec=
 =yCpP
 -----END PGP SIGNATURE-----

Merge tag 'gpio-updates-for-v5.8-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into devel

gpio: updates for v5.8 - part 2

- fix the initialization ordering in gpio-max730x
- make gpio-pxa buildable for compile testing
- make gpio-pca953x buildable as a module
This commit is contained in:
Linus Walleij 2020-05-27 15:39:27 +02:00
Родитель 6f8cd24641 e33a58a29c
Коммит f8af9113b1
2 изменённых файлов: 7 добавлений и 9 удалений

Просмотреть файл

@ -439,7 +439,7 @@ config GPIO_PMIC_EIC_SPRD
config GPIO_PXA
bool "PXA GPIO support"
depends on ARCH_PXA || ARCH_MMP
depends on ARCH_PXA || ARCH_MMP || COMPILE_TEST
help
Say yes here to support the PXA GPIO device
@ -952,7 +952,7 @@ config GPIO_PCA953X
config GPIO_PCA953X_IRQ
bool "Interrupt controller support for PCA953x"
depends on GPIO_PCA953X=y
depends on GPIO_PCA953X
select GPIOLIB_IRQCHIP
help
Say yes here to enable the pca953x to be used as an interrupt

Просмотреть файл

@ -47,7 +47,7 @@
static int max7301_direction_input(struct gpio_chip *chip, unsigned offset)
{
struct max7301 *ts = gpiochip_get_data(chip);
struct max7301 *ts = container_of(chip, struct max7301, chip);
u8 *config;
u8 offset_bits, pin_config;
int ret;
@ -89,7 +89,7 @@ static int __max7301_set(struct max7301 *ts, unsigned offset, int value)
static int max7301_direction_output(struct gpio_chip *chip, unsigned offset,
int value)
{
struct max7301 *ts = gpiochip_get_data(chip);
struct max7301 *ts = container_of(chip, struct max7301, chip);
u8 *config;
u8 offset_bits;
int ret;
@ -189,10 +189,6 @@ int __max730x_probe(struct max7301 *ts)
ts->chip.parent = dev;
ts->chip.owner = THIS_MODULE;
ret = gpiochip_add_data(&ts->chip, ts);
if (ret)
goto exit_destroy;
/*
* initialize pullups according to platform data and cache the
* register values for later use.
@ -214,7 +210,9 @@ int __max730x_probe(struct max7301 *ts)
}
}
return ret;
ret = gpiochip_add_data(&ts->chip, ts);
if (!ret)
return ret;
exit_destroy:
mutex_destroy(&ts->lock);