diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-09-07 10:53:00 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-09-07 10:53:00 -0700 |
commit | 27c7651a6a5f143eccd66db38c7a3035e1f8bcfb (patch) | |
tree | c20d3525a2933a8ea7e9ab03022c432b18e0e48a /drivers/gpio/gpio-pcf857x.c | |
parent | 8b8a7df9a1d87ba413fce246b11f54c636bb456a (diff) | |
parent | 65d876564e989b63b0f769e0e06b9830db97b2d9 (diff) |
Merge tag 'gpio-v3.12-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio
Pull GPIO updates from Linus Walleij:
"This is the bulk of GPIO changes for the v3.12 series:
- A new driver for the TZ1090 PDC which is used on the metag
architecture.
- A new driver for the Kontron ETX or COMexpress GPIO block. This is
found on some ETX x86 devices.
- A new driver for the Fintek Super-I/O chips, used on some x86
boards.
- Added device tree probing on a few select GPIO blocks.
- Drop the Exynos support from the Samsung GPIO driver.
The Samsung maintainers have moved over to use the modernized pin
control driver to provide GPIO for the modern platforms instead.
- The usual bunch of non-critical fixes and cleanups"
* tag 'gpio-v3.12-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (36 commits)
gpio: return -ENOTSUPP if debounce cannot be set
gpio: improve error path in gpiolib
gpio: add GPIO support for F71882FG and F71889F
of: add vendor prefix for Microchip Technology Inc
gpio: mcp23s08: rename the device tree property
gpio: samsung: Drop support for Exynos SoCs
gpio: pcf857x: Remove pdata argument to pcf857x_irq_domain_init()
gpio: pcf857x: Sort headers alphabetically
gpio: max7301: Reverting "Do not force SPI speed when using OF Platform"
gpio: Fix bit masking in Kontron PLD GPIO driver
gpio: pca953x: fix gpio input on gpio offsets >= 8
drivers/gpio: simplify use of devm_ioremap_resource
drivers/gpio/gpio-omap.c: convert comma to semicolon
gpio-lynxpoint: Fix warning about unbalanced pm_runtime_enable
gpio: Fix platform driver name in Kontron PLD GPIO driver
gpio: adnp: Fix segfault if request_threaded_irq fails
gpio: msm: Staticize local variable 'msm_gpio'
gpio: gpiolib-of.c: make error message more meaningful by adding the node name and index
gpio: use dev_get_platdata()
gpio/mxc: add chained_irq_enter/exit() to mx2_gpio_irq_handler
...
Diffstat (limited to 'drivers/gpio/gpio-pcf857x.c')
-rw-r--r-- | drivers/gpio/gpio-pcf857x.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/gpio/gpio-pcf857x.c b/drivers/gpio/gpio-pcf857x.c index e8faf53f3875..9e61bb0719d0 100644 --- a/drivers/gpio/gpio-pcf857x.c +++ b/drivers/gpio/gpio-pcf857x.c @@ -18,15 +18,15 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include <linux/kernel.h> -#include <linux/slab.h> #include <linux/gpio.h> #include <linux/i2c.h> #include <linux/i2c/pcf857x.h> #include <linux/interrupt.h> #include <linux/irq.h> #include <linux/irqdomain.h> +#include <linux/kernel.h> #include <linux/module.h> +#include <linux/slab.h> #include <linux/spinlock.h> #include <linux/workqueue.h> @@ -223,7 +223,6 @@ static void pcf857x_irq_domain_cleanup(struct pcf857x *gpio) } static int pcf857x_irq_domain_init(struct pcf857x *gpio, - struct pcf857x_platform_data *pdata, struct i2c_client *client) { int status; @@ -262,7 +261,7 @@ static int pcf857x_probe(struct i2c_client *client, struct pcf857x *gpio; int status; - pdata = client->dev.platform_data; + pdata = dev_get_platdata(&client->dev); if (!pdata) { dev_dbg(&client->dev, "no platform data\n"); } @@ -286,8 +285,8 @@ static int pcf857x_probe(struct i2c_client *client, gpio->chip.ngpio = id->driver_data; /* enable gpio_to_irq() if platform has settings */ - if (pdata && client->irq) { - status = pcf857x_irq_domain_init(gpio, pdata, client); + if (client->irq) { + status = pcf857x_irq_domain_init(gpio, client); if (status < 0) { dev_err(&client->dev, "irq_domain init failed\n"); goto fail; @@ -388,7 +387,7 @@ fail: dev_dbg(&client->dev, "probe error %d for '%s'\n", status, client->name); - if (pdata && client->irq) + if (client->irq) pcf857x_irq_domain_cleanup(gpio); return status; @@ -396,7 +395,7 @@ fail: static int pcf857x_remove(struct i2c_client *client) { - struct pcf857x_platform_data *pdata = client->dev.platform_data; + struct pcf857x_platform_data *pdata = dev_get_platdata(&client->dev); struct pcf857x *gpio = i2c_get_clientdata(client); int status = 0; @@ -411,7 +410,7 @@ static int pcf857x_remove(struct i2c_client *client) } } - if (pdata && client->irq) + if (client->irq) pcf857x_irq_domain_cleanup(gpio); status = gpiochip_remove(&gpio->chip); |