diff options
Diffstat (limited to 'arch/arm/common/scoop.c')
| -rw-r--r-- | arch/arm/common/scoop.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/arch/arm/common/scoop.c b/arch/arm/common/scoop.c index 9ba45ade5f48..dddb73c96826 100644 --- a/arch/arm/common/scoop.c +++ b/arch/arm/common/scoop.c @@ -1,18 +1,14 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * Support code for the SCOOP interface found on various Sharp PDAs * * Copyright (c) 2004 Richard Purdie * * Based on code written by Sharp/Lineo for 2.4 kernels - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * */ #include <linux/device.h> -#include <linux/gpio.h> +#include <linux/gpio/driver.h> #include <linux/string.h> #include <linux/slab.h> #include <linux/platform_device.h> @@ -67,7 +63,8 @@ static void __scoop_gpio_set(struct scoop_dev *sdev, iowrite16(gpwr, sdev->base + SCOOP_GPWR); } -static void scoop_gpio_set(struct gpio_chip *chip, unsigned offset, int value) +static int scoop_gpio_set(struct gpio_chip *chip, unsigned int offset, + int value) { struct scoop_dev *sdev = gpiochip_get_data(chip); unsigned long flags; @@ -77,6 +74,8 @@ static void scoop_gpio_set(struct gpio_chip *chip, unsigned offset, int value) __scoop_gpio_set(sdev, offset, value); spin_unlock_irqrestore(&sdev->scoop_lock, flags); + + return 0; } static int scoop_gpio_get(struct gpio_chip *chip, unsigned offset) @@ -240,21 +239,16 @@ err_ioremap: return ret; } -static int scoop_remove(struct platform_device *pdev) +static void scoop_remove(struct platform_device *pdev) { struct scoop_dev *sdev = platform_get_drvdata(pdev); - if (!sdev) - return -EINVAL; - if (sdev->gpio.base != -1) gpiochip_remove(&sdev->gpio); platform_set_drvdata(pdev, NULL); iounmap(sdev->base); kfree(sdev); - - return 0; } static struct platform_driver scoop_driver = { |
