From patchwork Wed Jan 5 19:06:01 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 454531 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p05J7dXG005453 for ; Wed, 5 Jan 2011 19:07:39 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752075Ab1AETHi (ORCPT ); Wed, 5 Jan 2011 14:07:38 -0500 Received: from opensource.wolfsonmicro.com ([80.75.67.52]:37293 "EHLO opensource2.wolfsonmicro.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751989Ab1AETHi (ORCPT ); Wed, 5 Jan 2011 14:07:38 -0500 Received: from rakim.wolfsonmicro.main (lumison.wolfsonmicro.com [87.246.78.27]) by opensource2.wolfsonmicro.com (Postfix) with ESMTPSA id 3A2561105E6; Wed, 5 Jan 2011 19:07:37 +0000 (GMT) Received: by rakim.wolfsonmicro.main (Postfix, from userid 1000) id 1910E32D0806; Wed, 5 Jan 2011 19:06:02 +0000 (GMT) From: Mark Brown To: Daniel Mack , Sven Neumann , Dmitry Torokhov Cc: linux-input@vger.kernel.org, Mark Brown Subject: [PATCH] Input: eeti_ts - Convert to dev_pm_ops Date: Wed, 5 Jan 2011 19:06:01 +0000 Message-Id: <1294254361-26066-1-git-send-email-broonie@opensource.wolfsonmicro.com> X-Mailer: git-send-email 1.7.2.3 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.3 (demeter1.kernel.org [140.211.167.41]); Wed, 05 Jan 2011 19:07:39 +0000 (UTC) diff --git a/drivers/input/touchscreen/eeti_ts.c b/drivers/input/touchscreen/eeti_ts.c index 7a3a916..1f0ef91 100644 --- a/drivers/input/touchscreen/eeti_ts.c +++ b/drivers/input/touchscreen/eeti_ts.c @@ -261,8 +261,9 @@ static int __devexit eeti_ts_remove(struct i2c_client *client) } #ifdef CONFIG_PM -static int eeti_ts_suspend(struct i2c_client *client, pm_message_t mesg) +static int eeti_ts_suspend(struct device *dev) { + struct i2c_client *client = to_i2c_client(dev); struct eeti_ts_priv *priv = i2c_get_clientdata(client); struct input_dev *input_dev = priv->input; @@ -279,8 +280,9 @@ static int eeti_ts_suspend(struct i2c_client *client, pm_message_t mesg) return 0; } -static int eeti_ts_resume(struct i2c_client *client) +static int eeti_ts_resume(struct device *dev) { + struct i2c_client *client = to_i2c_client(dev); struct eeti_ts_priv *priv = i2c_get_clientdata(client); struct input_dev *input_dev = priv->input; @@ -296,9 +298,10 @@ static int eeti_ts_resume(struct i2c_client *client) return 0; } + +static SIMPLE_DEV_PM_OPS(eeti_ts_pm, eeti_ts_suspend, eeti_ts_resume); #else -#define eeti_ts_suspend NULL -#define eeti_ts_resume NULL +#define eeti_ts_pm NULL #endif static const struct i2c_device_id eeti_ts_id[] = { @@ -310,11 +313,10 @@ MODULE_DEVICE_TABLE(i2c, eeti_ts_id); static struct i2c_driver eeti_ts_driver = { .driver = { .name = "eeti_ts", + .pm = &eeti_ts_pm, }, .probe = eeti_ts_probe, .remove = __devexit_p(eeti_ts_remove), - .suspend = eeti_ts_suspend, - .resume = eeti_ts_resume, .id_table = eeti_ts_id, };