diff options
Diffstat (limited to 'drivers/gpio/gpio-ge.c')
-rw-r--r-- | drivers/gpio/gpio-ge.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/gpio/gpio-ge.c b/drivers/gpio/gpio-ge.c index f9ac3f351..cbbec838a 100644 --- a/drivers/gpio/gpio-ge.c +++ b/drivers/gpio/gpio-ge.c @@ -24,7 +24,7 @@ #include <linux/of_gpio.h> #include <linux/of_address.h> #include <linux/module.h> -#include <linux/basic_mmio_gpio.h> +#include <linux/gpio/driver.h> #define GEF_GPIO_DIRECT 0x00 #define GEF_GPIO_IN 0x04 @@ -55,19 +55,19 @@ static int __init gef_gpio_probe(struct platform_device *pdev) { const struct of_device_id *of_id = of_match_device(gef_gpio_ids, &pdev->dev); - struct bgpio_chip *bgc; + struct gpio_chip *gc; void __iomem *regs; int ret; - bgc = devm_kzalloc(&pdev->dev, sizeof(*bgc), GFP_KERNEL); - if (!bgc) + gc = devm_kzalloc(&pdev->dev, sizeof(*gc), GFP_KERNEL); + if (!gc) return -ENOMEM; regs = of_iomap(pdev->dev.of_node, 0); if (!regs) return -ENOMEM; - ret = bgpio_init(bgc, &pdev->dev, 4, regs + GEF_GPIO_IN, + ret = bgpio_init(gc, &pdev->dev, 4, regs + GEF_GPIO_IN, regs + GEF_GPIO_OUT, NULL, NULL, regs + GEF_GPIO_DIRECT, BGPIOF_BIG_ENDIAN_BYTE_ORDER); if (ret) { @@ -76,20 +76,20 @@ static int __init gef_gpio_probe(struct platform_device *pdev) } /* Setup pointers to chip functions */ - bgc->gc.label = devm_kstrdup(&pdev->dev, pdev->dev.of_node->full_name, + gc->label = devm_kstrdup(&pdev->dev, pdev->dev.of_node->full_name, GFP_KERNEL); - if (!bgc->gc.label) { + if (!gc->label) { ret = -ENOMEM; goto err0; } - bgc->gc.base = -1; - bgc->gc.ngpio = (u16)(uintptr_t)of_id->data; - bgc->gc.of_gpio_n_cells = 2; - bgc->gc.of_node = pdev->dev.of_node; + gc->base = -1; + gc->ngpio = (u16)(uintptr_t)of_id->data; + gc->of_gpio_n_cells = 2; + gc->of_node = pdev->dev.of_node; /* This function adds a memory mapped GPIO chip */ - ret = gpiochip_add(&bgc->gc); + ret = gpiochip_add_data(gc, NULL); if (ret) goto err0; |