Message ID | 1351078736-16785-2-git-send-email-matthias.bgg@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
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@gmail.com> > --- > 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 >
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; +}; +
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. Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com> --- drivers/input/touchscreen/ads7846.c | 9 --------- include/linux/spi/ads7846.h | 9 +++++++++ 2 files changed, 9 insertions(+), 9 deletions(-)