Thread (5 messages) 5 messages, 3 authors, 2009-05-15

Re: [PATCH] TSC2007: private data for platform callbacks.

From: Manuel Lauss <hidden>
Date: 2009-05-14 10:37:42
Also in: lkml

Hi Trilok,

On Thu, May 14, 2009 at 03:58:19PM +0530, Trilok Soni wrote:
CCing linux-input mailing list, so not deleting any code from this
e-mail while replying.

On Thu, May 14, 2009 at 3:39 PM, Manuel Lauss
[off-list ref] wrote:
quoted
Add a private data field to the tsc2007 platform data and pass this
to the callbacks.
I hope that you have created this patch on top of two recently posted
patches by Kwangwoo Lee
to merge changes from Thierry.
No; it's against Linux's git. Will rediff.


 
quoted
- ? ? ? int ? ? ? ? ? ? ? ? ? ? (*get_pendown_state)(void);
- ? ? ? void ? ? ? ? ? ? ? ? ? ?(*clear_penirq)(void);
+ ? ? ? struct tsc2007_platform_data *pd;
?};

+/* ask platform for pendown state */
+static inline int ts_get_pendown_state(struct tsc2007 *ts)
+{
+ ? ? ? return ts->pd->get_pendown_state(ts->pd->priv);
So, we don't need check here, like this:

if (ts->pd->get_pendown_state)
          ret =  ts->pd->get_pendown_state(ts->pd->priv);
The driver doesn't work right without that callback so the check
in here is kind of pointless. Better to check for it in the
probe function and refuse to probe if it isn't there.  All other
callbacks seem optional to me.

 
quoted
? ? ? ?struct tsc2007 *ts;
- ? ? ? struct tsc2007_platform_data *pdata = pdata = client->dev.platform_data;
+ ? ? ? struct tsc2007_platform_data *pdata = client->dev.platform_data;
This change shows that you need to rebase based on two patches
submitted by Lee recently.
Ah, that shouldn't be in there in the first place.

Thanks!
	Manuel Lauss
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help