Re: [PATCH 2/2] touchscreen/ads7846.c: move filter variables to global include

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Oct 24, 2012 at 01:38:56PM +0200, Matthias Brugger wrote:
> To implement a custom filter in the board platform code,
> the struct ads7846_filterd might be needed. This patch moves the struct
> to the global include file of the driver.

Why would a custom filer care about debounce filter's private data?
Just have it define its very own structure, no need to export.

Thanks.

> 
> Signed-off-by: Matthias Brugger <matthias.bgg@xxxxxxxxx>
> ---
>  drivers/input/touchscreen/ads7846.c |    9 ---------
>  include/linux/spi/ads7846.h         |    9 +++++++++
>  2 files changed, 9 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c
> index 9e61a4b..cc3b048 100644
> --- a/drivers/input/touchscreen/ads7846.c
> +++ b/drivers/input/touchscreen/ads7846.c
> @@ -90,15 +90,6 @@ struct ads7846_packet {
>  	u8			read_x_cmd[3], read_y_cmd[3], pwrdown_cmd[3];
>  };
>  
> -struct ads7846_filterd {
> -	int			read_cnt;
> -	int			read_rep;
> -	int			last_read;
> -	u16			debounce_max;
> -	u16			debounce_tol;
> -	u16			debounce_rep;
> -};
> -
>  struct ads7846 {
>  	struct input_dev	*input;
>  	char			phys[32];
> diff --git a/include/linux/spi/ads7846.h b/include/linux/spi/ads7846.h
> index c64de9d..cc7b34d 100644
> --- a/include/linux/spi/ads7846.h
> +++ b/include/linux/spi/ads7846.h
> @@ -58,3 +58,12 @@ struct ads7846_platform_data {
>  	unsigned long irq_flags;
>  };
>  
> +struct ads7846_filterd {
> +	int			read_cnt;
> +	int			read_rep;
> +	int			last_read;
> +	u16			debounce_max;
> +	u16			debounce_tol;
> +	u16			debounce_rep;
> +};
> +
> -- 
> 1.7.9.5
> 

-- 
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux