lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7d336ff8-25b8-e4f1-ec43-09e9414660a4@enneenne.com>
Date:   Tue, 9 Mar 2021 13:25:59 +0100
From:   Rodolfo Giometti <giometti@...eenne.com>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        linux-kernel@...r.kernel.org
Cc:     Ryan Govostes <rgovostes@...i.edu>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: Re: [PATCH resend v1 4/7] pps: clients: gpio: Get rid of legacy
 platform data

On 09/03/21 12:24, Andy Shevchenko wrote:
> Platform data is a legacy interface to supply device properties
> to the driver. In this case we even don't have in-kernel users
> for it. Just remove it for good.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
> ---
>  drivers/pps/clients/pps-gpio.c | 17 +++--------------
>  include/linux/pps-gpio.h       | 19 -------------------
>  2 files changed, 3 insertions(+), 33 deletions(-)
>  delete mode 100644 include/linux/pps-gpio.h
> 
> diff --git a/drivers/pps/clients/pps-gpio.c b/drivers/pps/clients/pps-gpio.c
> index dc9ed6fc3dae..291240dce79e 100644
> --- a/drivers/pps/clients/pps-gpio.c
> +++ b/drivers/pps/clients/pps-gpio.c
> @@ -16,7 +16,6 @@
>  #include <linux/platform_device.h>
>  #include <linux/slab.h>
>  #include <linux/pps_kernel.h>
> -#include <linux/pps-gpio.h>
>  #include <linux/gpio/consumer.h>
>  #include <linux/list.h>
>  #include <linux/of_device.h>
> @@ -164,7 +163,6 @@ static int pps_gpio_probe(struct platform_device *pdev)
>  	struct pps_gpio_device_data *data;
>  	int ret;
>  	int pps_default_params;
> -	const struct pps_gpio_platform_data *pdata = pdev->dev.platform_data;
>  
>  	/* allocate space for device info */
>  	data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL);
> @@ -173,18 +171,9 @@ static int pps_gpio_probe(struct platform_device *pdev)
>  	platform_set_drvdata(pdev, data);
>  
>  	/* GPIO setup */
> -	if (pdata) {
> -		data->gpio_pin = pdata->gpio_pin;
> -		data->echo_pin = pdata->echo_pin;
> -
> -		data->assert_falling_edge = pdata->assert_falling_edge;
> -		data->capture_clear = pdata->capture_clear;
> -		data->echo_active_ms = pdata->echo_active_ms;
> -	} else {
> -		ret = pps_gpio_setup(pdev);
> -		if (ret)
> -			return -EINVAL;
> -	}
> +	ret = pps_gpio_setup(pdev);
> +	if (ret)
> +		return -EINVAL;
>  
>  	/* IRQ setup */
>  	ret = gpiod_to_irq(data->gpio_pin);
> diff --git a/include/linux/pps-gpio.h b/include/linux/pps-gpio.h
> deleted file mode 100644
> index 7bf49908be06..000000000000
> --- a/include/linux/pps-gpio.h
> +++ /dev/null
> @@ -1,19 +0,0 @@
> -/* SPDX-License-Identifier: GPL-2.0-or-later */
> -/*
> - * pps-gpio.h -- PPS client for GPIOs
> - *
> - * Copyright (C) 2011 James Nuss <jamesnuss@...ometrics.ca>
> - */
> -
> -#ifndef _PPS_GPIO_H
> -#define _PPS_GPIO_H
> -
> -struct pps_gpio_platform_data {
> -	struct gpio_desc *gpio_pin;
> -	struct gpio_desc *echo_pin;
> -	bool assert_falling_edge;
> -	bool capture_clear;
> -	unsigned int echo_active_ms;
> -};
> -
> -#endif /* _PPS_GPIO_H */
> 

Acked-by: Rodolfo Giometti <giometti@...eenne.com>

-- 
GNU/Linux Solutions                  e-mail: giometti@...eenne.com
Linux Device Driver                          giometti@...ux.it
Embedded Systems                     phone:  +39 349 2432127
UNIX programming                     skype:  rodolfo.giometti

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ