linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Input: htcpen - add #ifdef CONFIG_PNP guard for pnp_ids
@ 2011-11-10  4:24 Axel Lin
  2011-11-10  5:18 ` Dmitry Torokhov
  0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2011-11-10  4:24 UTC (permalink / raw)
  To: linux-kernel; +Cc: Pau Oliva Fora, Dmitry Torokhov, linux-input

Fix below build warning if CONFIG_PNP is disabled.

  CC      drivers/input/touchscreen/htcpen.o
drivers/input/touchscreen/htcpen.c:50: warning: 'pnp_ids' defined but not used

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
 drivers/input/touchscreen/htcpen.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/input/touchscreen/htcpen.c b/drivers/input/touchscreen/htcpen.c
index 62811de..7acc928 100644
--- a/drivers/input/touchscreen/htcpen.c
+++ b/drivers/input/touchscreen/htcpen.c
@@ -47,11 +47,13 @@ static int invert_y;
 module_param(invert_y, bool, 0644);
 MODULE_PARM_DESC(invert_y, "If set, Y axis is inverted");
 
+#ifdef CONFIG_PNP
 static struct pnp_device_id pnp_ids[] = {
 	{ .id = "PNP0cc0" },
 	{ .id = "" }
 };
 MODULE_DEVICE_TABLE(pnp, pnp_ids);
+#endif
 
 static irqreturn_t htcpen_interrupt(int irq, void *handle)
 {
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Input: htcpen - add #ifdef CONFIG_PNP guard for pnp_ids
  2011-11-10  4:24 [PATCH] Input: htcpen - add #ifdef CONFIG_PNP guard for pnp_ids Axel Lin
@ 2011-11-10  5:18 ` Dmitry Torokhov
  0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Torokhov @ 2011-11-10  5:18 UTC (permalink / raw)
  To: Axel Lin; +Cc: linux-kernel, Pau Oliva Fora, linux-input

On Thu, Nov 10, 2011 at 12:24:51PM +0800, Axel Lin wrote:
> Fix below build warning if CONFIG_PNP is disabled.
> 
>   CC      drivers/input/touchscreen/htcpen.o
> drivers/input/touchscreen/htcpen.c:50: warning: 'pnp_ids' defined but not used
> 

Does not seem to help, How about below instead?

Thanks.

-- 
Dmitry


Input: htcpen - switch to DMI-based autoloading

From: Dmitry Torokhov <dmitry.torokhov@gmail.com>

Having module device table based on PNP id produces the following warning:

  CC      drivers/input/touchscreen/htcpen.o
drivers/input/touchscreen/htcpen.c:50: warning: 'pnp_ids' defined but not used

This happens because it is not a PNP driver, bit rather ISA driver and
pnp_ids table is not used anywhere. To fix this issue let's switch to
DMI-based module table instead,

Reported-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
---

 drivers/input/touchscreen/htcpen.c |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)


diff --git a/drivers/input/touchscreen/htcpen.c b/drivers/input/touchscreen/htcpen.c
index 62811de..81e3386 100644
--- a/drivers/input/touchscreen/htcpen.c
+++ b/drivers/input/touchscreen/htcpen.c
@@ -47,12 +47,6 @@ static int invert_y;
 module_param(invert_y, bool, 0644);
 MODULE_PARM_DESC(invert_y, "If set, Y axis is inverted");
 
-static struct pnp_device_id pnp_ids[] = {
-	{ .id = "PNP0cc0" },
-	{ .id = "" }
-};
-MODULE_DEVICE_TABLE(pnp, pnp_ids);
-
 static irqreturn_t htcpen_interrupt(int irq, void *handle)
 {
 	struct input_dev *htcpen_dev = handle;
@@ -237,6 +231,7 @@ static struct dmi_system_id __initdata htcshift_dmi_table[] = {
 	},
 	{ }
 };
+MODULE_DEVICE_TABLE(dmi, htcshift_dmi_table);
 
 static int __init htcpen_isa_init(void)
 {

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-11-10  5:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-10  4:24 [PATCH] Input: htcpen - add #ifdef CONFIG_PNP guard for pnp_ids Axel Lin
2011-11-10  5:18 ` Dmitry Torokhov

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).