From patchwork Mon Aug 29 19:50:17 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 1110402 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p7TJoZmc022425 for ; Mon, 29 Aug 2011 19:50:49 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754795Ab1H2TuX (ORCPT ); Mon, 29 Aug 2011 15:50:23 -0400 Received: from oproxy6-pub.bluehost.com ([67.222.54.6]:43149 "HELO oproxy6-pub.bluehost.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1754722Ab1H2TuX (ORCPT ); Mon, 29 Aug 2011 15:50:23 -0400 Received: (qmail 10064 invoked by uid 0); 29 Aug 2011 19:50:20 -0000 Received: from unknown (HELO box742.bluehost.com) (66.147.244.242) by cpoproxy3.bluehost.com with SMTP; 29 Aug 2011 19:50:19 -0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xenotime.net; s=default; h=Content-Transfer-Encoding:Content-Type:Mime-Version:Message-Id:Subject:Cc:To:From:Date; bh=QAuz9rTGBmGBLwRqr8S93ViIQxosOJ1xtLC6GdBI5Gg=; b=KviFbvHbYIdQ4og7NKClOfYEjg4D72At6PgDkzKjIVUWh0R71rNqu8IN/XGIjilaGzbG+V4opEVqfd93yaw6R83lmKB8ejl51h9oeS+Wah07O5I1vekIuYRyaSf1j1mG; Received: from static-50-53-38-135.bvtn.or.frontiernet.net ([50.53.38.135] helo=chimera.site) by box742.bluehost.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1Qy7qd-0005hn-7Q; Mon, 29 Aug 2011 13:50:19 -0600 Date: Mon, 29 Aug 2011 12:50:17 -0700 From: Randy Dunlap To: lkml , Geert Uytterhoeven Cc: Dmitry Torokhov , linux-input@vger.kernel.org Subject: [PATCH] input: fix misc/twl6040-vibra.c warning Message-Id: <20110829125017.9337299c.rdunlap@xenotime.net> Organization: YPO4 X-Mailer: Sylpheed 2.7.1 (GTK+ 2.16.6; x86_64-unknown-linux-gnu) Mime-Version: 1.0 X-Identified-User: {1807:box742.bluehost.com:xenotime:xenotime.net} {sentby:smtp auth 50.53.38.135 authed with rdunlap@xenotime.net} Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Mon, 29 Aug 2011 19:51:32 +0000 (UTC) From: Randy Dunlap 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 --- drivers/input/misc/twl6040-vibra.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- 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, }, };