From: Andrew Morton <akpm@linux-foundation.org>
To: Matthew Garrett <mjg59@srcf.ucam.org>
Cc: linux-kernel@vger.kernel.org, Matt_Domsch@dell.com,
greg@kroah.com, linux-acpi@vger.kernel.org, rpurdie@rpsys.net,
ivdoorn@gmail.com
Subject: Re: [PATCH 2/2] misc: Add dell-laptop driver
Date: Tue, 2 Dec 2008 12:22:22 -0800 [thread overview]
Message-ID: <20081202122222.5873ee86.akpm@linux-foundation.org> (raw)
In-Reply-To: <20081202200544.GA31620@srcf.ucam.org>
On Tue, 2 Dec 2008 20:05:45 +0000
Matthew Garrett <mjg59@srcf.ucam.org> wrote:
> > > +#ifdef CONFIG_ACPI
> > > + if (acpi_video_backlight_support())
> > > + return 0;
> > > +#endif
> >
> > Do we need the ifdefs here? It looks like include/linux/acpi.h tries
> > to provide a suitable 0-returning stub?
>
> They're protected by #ifdef CONFIG_ACPI_VIDEO, but it looks like acpi.h
> is empty if CONFIG_ACPI isn't set?
No, acpi.h has a _few_ ACPI=n stubs:
: static inline int early_acpi_boot_init(void)
: {
: return 0;
: }
: static inline int acpi_boot_init(void)
: {
: return 0;
: }
:
: static inline int acpi_boot_table_init(void)
: {
: return 0;
: }
:
: static inline int acpi_mps_check(void)
: {
: return 0;
: }
:
: static inline int acpi_check_resource_conflict(struct resource *res)
: {
: return 0;
: }
:
: static inline int acpi_check_region(resource_size_t start, resource_size_t n,
: const char *name)
: {
: return 0;
: }
:
: static inline int acpi_check_mem_region(resource_size_t start,
: resource_size_t n, const char *name)
: {
: return 0;
: }
So it seems that acpi_video_backlight_support() should be added to this
list. Except it already has a stub, in the wrong place. This whole block:
: #if defined(CONFIG_ACPI_VIDEO) || defined(CONFIG_ACPI_VIDEO_MODULE)
:
: extern long acpi_video_get_capabilities(acpi_handle graphics_dev_handle);
: extern long acpi_is_video_device(struct acpi_device *device);
: extern int acpi_video_backlight_support(void);
: extern int acpi_video_display_switch_support(void);
:
: #else
:
: static inline long acpi_video_get_capabilities(acpi_handle graphics_dev_handle)
: {
: return 0;
: }
:
: static inline long acpi_is_video_device(struct acpi_device *device)
: {
: return 0;
: }
:
: static inline int acpi_video_backlight_support(void)
: {
: return 0;
: }
:
: static inline int acpi_video_display_switch_support(void)
: {
: return 0;
: }
:
: #endif /* defined(CONFIG_ACPI_VIDEO) || defined(CONFIG_ACPI_VIDEO_MODULE) */
:
needs to be moved outside the `#ifdef CONFIG_ACPI' altogether. Then you
can drop the ifdef.
next prev parent reply other threads:[~2008-12-02 20:23 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-27 16:33 [PATCH 1/2] dcdbas: Export functionality for use in other drivers Matthew Garrett
2008-11-27 16:34 ` [PATCH 2/2] misc: Add dell-laptop driver Matthew Garrett
2008-12-02 17:02 ` Matt Domsch
2008-12-02 17:03 ` Matthew Garrett
2008-12-02 19:50 ` Andrew Morton
2008-12-02 20:05 ` Matthew Garrett
2008-12-02 20:22 ` Andrew Morton [this message]
2008-12-02 20:30 ` Matthew Garrett
2008-12-02 20:16 ` [PATCH 2/2 update] " Matthew Garrett
2008-12-03 12:37 ` Alan Jenkins
2008-12-03 13:01 ` none
2008-12-05 2:05 ` Henrique de Moraes Holschuh
2008-12-03 19:14 ` Len Brown
2008-12-03 19:52 ` Matthew Garrett
2008-12-04 9:12 ` Sven Wegener
2008-12-04 11:00 ` Alan Jenkins
2008-12-05 2:08 ` Henrique de Moraes Holschuh
2008-12-02 3:52 ` [PATCH 1/2] dcdbas: Export functionality for use in other drivers Greg KH
2008-12-02 4:03 ` Matthew Garrett
2008-12-02 17:03 ` Matt Domsch
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=20081202122222.5873ee86.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=Matt_Domsch@dell.com \
--cc=greg@kroah.com \
--cc=ivdoorn@gmail.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mjg59@srcf.ucam.org \
--cc=rpurdie@rpsys.net \
/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