From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Kristoffer Ericson <kristoffer.ericson@gmail.com>
Cc: Roel Kluin <12o3l@tiscali.nl>,
rpurdie@openedhand.com,
Linux-arm <linux-arm-kernel@lists.arm.linux.org.uk>,
linux-main <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH/HP7XX] - Add combined LCD / BL driver for platform HP Jornada 7xx handhelds
Date: Wed, 6 Feb 2008 19:31:55 +0000 [thread overview]
Message-ID: <20080206193155.GE32245@flint.arm.linux.org.uk> (raw)
In-Reply-To: <20080206202128.06fbcafa.Kristoffer.ericson@gmail.com>
On Wed, Feb 06, 2008 at 08:21:28PM +0100, Kristoffer Ericson wrote:
> Oh, and thanks for all the feedback people! (and for doing it nicely)
I'm afraid you missed one - and there's a better fix for one of the other
points I made... 8)
> +static int jornada_bl_probe(struct platform_device *pdev)
> +{
> + struct bllcd_device *bllcd;
int ret;
> +
> + bllcd = kzalloc(sizeof(*bllcd), GFP_KERNEL);
> + if (bllcd == NULL)
> + return -ENOMEM;
> +
> + /* bl driver - name must match fb driver name */
> + bllcd->bl_device = backlight_device_register(S1D_DEVICENAME,
> + &pdev->dev, NULL, &jornada_bl_ops);
> +
> + if (IS_ERR(bllcd->bl_device)) {
ret = PTR_ERR(bllcd->bl_device);
> + kfree(bllcd);
> + printk(KERN_ERR "bl :failed to register device\n");
> + return -ENODEV;
delete the line above, and then swap the two remaining lines.
return ret;
> + }
> +
> + /* lcd driver */
> + bllcd->lcd_device = lcd_device_register(S1D_DEVICENAME,
> + &pdev->dev, NULL, &jornada_lcd_ops);
> + if (IS_ERR(bllcd->lcd_device)) {
> + backlight_device_unregister(bllcd->bl_device);
ret = PTR_ERR(bllcd->lcd_device);
> + kfree(bllcd);
> + printk(KERN_ERR "lcd :failed to register device\n");
> + return -ENODEV;
delete the line above, and then swap the two remaining lines.
return ret;
The reason for swapping the two lines is that it _might_ give gcc a
chance to optimise the two paths.
> +static struct platform_driver jornada_bl_driver = {
> + .probe = jornada_bl_probe,
> + .remove = jornada_bl_remove,
> +#ifdef CONFIG_PM
> + .suspend = jornada_bl_suspend,
> + .resume = jornada_bl_resume,
> +#endif
> + .driver = {
> + .name = "jornada_bllcd",
You missed this one - which currently is: tab space space space space.
It should be two tabs.
next prev parent reply other threads:[~2008-02-06 19:32 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-05 18:53 [PATCH/HP7XX] - Add combined LCD / BL driver for platform HP Jornada 7xx handhelds Kristoffer Ericson
2008-02-06 12:34 ` Roel Kluin
2008-02-06 12:38 ` Roel Kluin
2008-02-06 16:33 ` Kristoffer Ericson
2008-02-06 16:44 ` Russell King - ARM Linux
2008-02-06 19:21 ` Kristoffer Ericson
2008-02-06 19:31 ` Russell King - ARM Linux [this message]
2008-02-06 19:43 ` Kristoffer Ericson
2008-02-06 19:45 ` Russell King - ARM Linux
2008-02-07 7:19 ` Uwe Kleine-König
2008-02-06 19:49 ` Kristoffer Ericson
2008-02-06 17:04 ` Roel Kluin
2008-02-06 17:22 ` Sam Ravnborg
2008-02-06 17:25 ` Richard Purdie
2008-02-06 16:26 ` Kristoffer Ericson
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=20080206193155.GE32245@flint.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=12o3l@tiscali.nl \
--cc=kristoffer.ericson@gmail.com \
--cc=linux-arm-kernel@lists.arm.linux.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=rpurdie@openedhand.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