aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/pnp.h
diff options
context:
space:
mode:
authorDavid Miller <davem@davemloft.net>2008-09-16 18:00:11 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-09-16 22:35:05 -0400
commitef3d7714f6b75b51825ad0384b5ce48358427e50 (patch)
tree57d7b06320367bf8ec2074f999aae7f9739c9269 /include/linux/pnp.h
parent49f276be7ce12d90b6941a000b09e61b68e6c4f2 (diff)
Fix PNP build failure, bugzilla #11276
This fill fix the following regression list entry: Bug-Entry : http://bugzilla.kernel.org/show_bug.cgi?id=11276 Subject : build error: CONFIG_OPTIMIZE_INLINING=y causes gcc 4.2 to do stupid things Submitter : Randy Dunlap <randy.dunlap@oracle.com> Date : 2008-08-06 17:18 (38 days old) References : http://marc.info/?l=linux-kernel&m=121804329014332&w=4 http://lkml.org/lkml/2008/7/22/353 Handled-By : Bjorn Helgaas <bjorn.helgaas@hp.com> Patch : http://lkml.org/lkml/2008/7/22/364 with what I believe is a better fix than the one referenced in the regression entry above. These PNP header interfaces try to work in such a way that you can reference some of them even if PNP is not enabled, and the compiler was expected to optimize everything away. Which is mostly fine, except that there was one interface for which there was not provided an inline "NOP" implementation. Once we add that, all of these compile failures cannot handle any more. pnp: Provide NOP inline implementation of pnp_get_resource() when !PNP Fixes kernel bugzilla #11276. Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/pnp.h')
-rw-r--r--include/linux/pnp.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/pnp.h b/include/linux/pnp.h
index 1ce54b63085d..be764e514e35 100644
--- a/include/linux/pnp.h
+++ b/include/linux/pnp.h
@@ -21,7 +21,14 @@ struct pnp_dev;
21/* 21/*
22 * Resource Management 22 * Resource Management
23 */ 23 */
24#ifdef CONFIG_PNP
24struct resource *pnp_get_resource(struct pnp_dev *, unsigned int, unsigned int); 25struct resource *pnp_get_resource(struct pnp_dev *, unsigned int, unsigned int);
26#else
27static inline struct resource *pnp_get_resource(struct pnp_dev *dev, unsigned int type, unsigned int num)
28{
29 return NULL;
30}
31#endif
25 32
26static inline int pnp_resource_valid(struct resource *res) 33static inline int pnp_resource_valid(struct resource *res)
27{ 34{