From: Corentin Chary <corentin.chary@gmail.com>
To: Yong Wang <yong.y.wang@linux.intel.com>
Cc: Matthew Garrett <mjg@redhat.com>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Richard Purdie <rpurdie@linux.intel.com>,
platform-driver-x86@vger.kernel.org, linux-input@vger.kernel.org
Subject: Re: [PATCH] eeepc-wmi: Add backlight support
Date: Wed, 7 Apr 2010 17:05:41 +0200 [thread overview]
Message-ID: <m2y71cd59b01004070805nb2e7a03cgccfa8d3deebe954c@mail.gmail.com> (raw)
In-Reply-To: <20100407141750.GA16896@ywang-moblin2.bj.intel.com>
On Wed, Apr 7, 2010 at 4:17 PM, Yong Wang <yong.y.wang@linux.intel.com> wrote:
> Add backlight support for WMI based Eee PC laptops. In addition, start
> to use a platform device to manage all functional devices as more
> features will be implemented later.
>
> +static struct platform_device *eeepc_wmi_platform_device;
> static struct input_dev *eeepc_wmi_input_dev;
> +struct backlight_device *eeepc_wmi_backlight_device;
Instead of using static variables, you should really use a struct
eeepc_wmi, store stuff inside it,
and make all these functions reentrant. Alan did it for eeepc-laptop,
and I did it for asus-laptop,
see http://git.iksaif.net/?p=acpi4asus.git;a=commit;h=854c78363f37f03e30e2856ef17d7eefc62e0d06
.
The driver would really be cleaner and easier to review with that. And
it would be more coherent with
eeepc-laptop's code.
--
Corentin Chary
http://xf.iksaif.net
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2010-04-07 15:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-07 14:17 [PATCH] eeepc-wmi: Add backlight support Yong Wang
2010-04-07 15:05 ` Corentin Chary [this message]
2010-04-07 22:50 ` Yong Wang
2010-04-08 5:29 ` Corentin Chary
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=m2y71cd59b01004070805nb2e7a03cgccfa8d3deebe954c@mail.gmail.com \
--to=corentin.chary@gmail.com \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=mjg@redhat.com \
--cc=platform-driver-x86@vger.kernel.org \
--cc=rpurdie@linux.intel.com \
--cc=yong.y.wang@linux.intel.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;
as well as URLs for NNTP newsgroup(s).