lkml.org 
[lkml]   [2012]   [Jun]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH] vga_switcheroo.h: fix pci_dev warning
At Fri, 15 Jun 2012 12:46:17 -0700,
Randy Dunlap wrote:
>
> From: Randy Dunlap <rdunlap@xenotime.net>
>
> Fix warnings on some architectures/configs (not on x86):
>
> include/linux/vga_switcheroo.h:28:30: warning: 'struct pci_dev' declared inside parameter list [enabled by default]
> include/linux/vga_switcheroo.h:28:30: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]
>
> Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
> Cc: Takashi Iwai <tiwai@suse.de>

Acked-by: Takashi Iwai <tiwai@suse.de>

And while we are at it, another trivial fix I stumbled on.


thanks,

Takashi

---
From: Takashi Iwai <tiwai@suse.de>
Subject: [PATCH] vga_switcheroo: Avoid double inclusion

Add a proper ifndef thingy to protect from the double inclusion.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
include/linux/vga_switcheroo.h | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/include/linux/vga_switcheroo.h b/include/linux/vga_switcheroo.h
index 60da41f..539acd3 100644
--- a/include/linux/vga_switcheroo.h
+++ b/include/linux/vga_switcheroo.h
@@ -7,6 +7,9 @@
* vga_switcheroo.h - Support for laptop with dual GPU using one set of outputs
*/

+#ifndef _LINUX_VGA_SWITCHEROO_H
+#define _LINUX_VGA_SWITCHEROO_H
+
#include <linux/fb.h>

enum vga_switcheroo_state {
@@ -71,3 +74,5 @@ static inline int vga_switcheroo_get_client_state(struct pci_dev *dev) { return


#endif
+
+#endif /* _LINUX_VGA_SWITCHEROO_H */
--
1.7.10.4


\
 
 \ /
  Last update: 2012-06-18 11:42    [W:0.039 / U:1.584 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site