mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Arve Hjønnevåg" <arve@android.com>
To: Pavel Machek <pavel@ucw.cz>
Cc: Brian Swetland <swetland@google.com>,
	kernel list <linux-kernel@vger.kernel.org>
Subject: Re: HTC: touchscreen driver
Date: Tue, 14 Jul 2009 15:07:12 -0700	[thread overview]
Message-ID: <d6200be20907141507s39b54cccq9f0cedc325d3a203@mail.gmail.com> (raw)
In-Reply-To: <20090714094629.GB2076@elf.ucw.cz>

On Tue, Jul 14, 2009 at 2:46 AM, Pavel Machek<pavel@ucw.cz> wrote:
>
>> >        if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) {
>> >                printk(KERN_ERR "synaptics_ts_probe: need I2C_FUNC_I2C\n");
>> > @@ -269,6 +354,9 @@ static int synaptics_ts_probe(
>> >        pdata = client->dev.platform_data;
>> >        if (pdata)
>> >                ts->power = pdata->power;
>> > +       else
>> > +               pdata = kzalloc(sizeof(*pdata), GFP_KERNEL);
>> > +
>>
>> Where do you free this?
>
> Well, nowhere; but it should not actually matter. ... btw can this
> path (!pdata) actually trigger? The driver will not be working,
> anyway, in that case..

The driver should work fine without the pdata. The pdata is used to
align the touchscreen data with the screen behind it.

>> > +       u32 flags;
>> > +       u32 inactive_left; /* 0x10000 = screen width */
>> > +       u32 inactive_right; /* 0x10000 = screen width */
>> > +       u32 inactive_top; /* 0x10000 = screen height */
>> > +       u32 inactive_bottom; /* 0x10000 = screen height */
>> > +       u32 snap_left_on; /* 0x10000 = screen width */
>> > +       u32 snap_left_off; /* 0x10000 = screen width */
>> > +       u32 snap_right_on; /* 0x10000 = screen width */
>> > +       u32 snap_right_off; /* 0x10000 = screen width */
>> > +       u32 snap_top_on; /* 0x10000 = screen height */
>> > +       u32 snap_top_off; /* 0x10000 = screen height */
>> > +       u32 snap_bottom_on; /* 0x10000 = screen height */
>> > +       u32 snap_bottom_off; /* 0x10000 = screen height */
>> > +       u32 fuzz_x; /* 0x10000 = screen width */
>> > +       u32 fuzz_y; /* 0x10000 = screen height */
>>
>> I prefer the existing C99 types.
>
> Yes, well, the rest of kernel disagrees with you.

The coding style document claims C99 types are allowed. If that is no
longer the case it should be updated.

>
>> This driver only supports a subset of Synaptics' devices so a more
>> generic driver will eventually be needed. The patch below adds support
>> for a more recent but similar panel.
>
> Ok, that should be simple enough to apply, but lets do improvements
> when we cleaned the code enough for the mainline...?

We need this change now. Your cleanup will cause conflicts for anyone
using our driver, so it would be better if it includes all our fixes.

-- 
Arve Hjønnevåg

  reply	other threads:[~2009-07-14 22:07 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20090710084323.GA6522@elf.ucw.cz>
     [not found] ` <a55d774e0907100155m25366994pe9ec5d0f5f868818@mail.gmail.com>
     [not found]   ` <20090710103243.GB7789@elf.ucw.cz>
     [not found]     ` <a55d774e0907100431j3fdc4671i6b185019594367fa@mail.gmail.com>
     [not found]       ` <20090713202302.GC2569@elf.ucw.cz>
2009-07-13 20:57         ` Pavel Machek
2009-07-13 22:07           ` Pavel Machek
2009-07-14  1:29             ` Arve Hjønnevåg
2009-07-14  1:44               ` Joe Perches
2009-07-14  9:46                 ` Pavel Machek
2009-07-15 19:05                 ` Frank Rowand
2009-07-14  9:23               ` Pavel Machek
2009-07-14  9:46               ` Pavel Machek
2009-07-14 22:07                 ` Arve Hjønnevåg [this message]
2009-07-14 22:16                   ` Pavel Machek
2009-07-14 22:45                     ` Arve Hjønnevåg
2009-07-15  6:21                       ` Trilok Soni
2009-07-15  6:48                         ` Arve Hjønnevåg
2009-07-19 21:23                       ` Pavel Machek
2009-07-20  3:43                         ` Arve Hjønnevåg
2009-07-20 10:47                           ` Pavel Machek
2009-07-21 10:11                           ` Pavel Machek
2009-07-22  1:12                             ` Arve Hjønnevåg
2009-07-23 21:25                               ` Pavel Machek
2009-07-24  0:11                                 ` Arve Hjønnevåg
2009-07-27 23:14                                   ` Pavel Machek
2009-07-27 23:38                                     ` Arve Hjønnevåg
2009-07-14 10:02               ` Pavel Machek
2009-07-14  1:48             ` Daniel Walker
2009-07-14  6:47               ` Trilok Soni
2009-07-14  0:17           ` Brian Swetland
2009-07-14  9:47             ` Pavel Machek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d6200be20907141507s39b54cccq9f0cedc325d3a203@mail.gmail.com \
    --to=arve@android.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=swetland@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®