lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20110829125017.9337299c.rdunlap@xenotime.net>
Date:	Mon, 29 Aug 2011 12:50:17 -0700
From:	Randy Dunlap <rdunlap@...otime.net>
To:	lkml <linux-kernel@...r.kernel.org>,
	Geert Uytterhoeven <geert@...ux-m68k.org>
Cc:	Dmitry Torokhov <dmitry.torokhov@...il.com>,
	linux-input@...r.kernel.org
Subject: [PATCH] input: fix misc/twl6040-vibra.c warning

From: Randy Dunlap <rdunlap@...otime.net>

Fix warning from Geert's build summary emails by changing "if" to
"ifdef".  Also handle the case of CONFIG_PM_SLEEP not enabled.

drivers/input/misc/twl6040-vibra.c:231:5: warning: "CONFIG_PM_SLEEP" is not defined

Builds cleanly with CONFIG_PM_SLEEP enabled or disabled.

Signed-off-by: Randy Dunlap <rdunlap@...otime.net>
---
 drivers/input/misc/twl6040-vibra.c |   11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

--- linux-next-20110829.orig/drivers/input/misc/twl6040-vibra.c
+++ linux-next-20110829/drivers/input/misc/twl6040-vibra.c
@@ -228,7 +228,7 @@ static void twl6040_vibra_close(struct i
 	mutex_unlock(&info->mutex);
 }
 
-#if CONFIG_PM_SLEEP
+#ifdef CONFIG_PM_SLEEP
 static int twl6040_vibra_suspend(struct device *dev)
 {
 	struct platform_device *pdev = to_platform_device(dev);
@@ -244,10 +244,13 @@ static int twl6040_vibra_suspend(struct 
 	return 0;
 }
 
-#endif
-
 static SIMPLE_DEV_PM_OPS(twl6040_vibra_pm_ops, twl6040_vibra_suspend, NULL);
 
+#define TWL6040_VIBRA_PM_OPS	(&twl6040_vibra_pm_ops)
+#else
+#define TWL6040_VIBRA_PM_OPS	NULL
+#endif
+
 static int __devinit twl6040_vibra_probe(struct platform_device *pdev)
 {
 	struct twl4030_vibra_data *pdata = pdev->dev.platform_data;
@@ -400,7 +403,7 @@ static struct platform_driver twl6040_vi
 	.driver		= {
 		.name	= "twl6040-vibra",
 		.owner	= THIS_MODULE,
-		.pm	= &twl6040_vibra_pm_ops,
+		.pm	= TWL6040_VIBRA_PM_OPS,
 	},
 };
 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ