From patchwork Mon Oct 20 19:52:02 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 39071 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ee0-f70.google.com (mail-ee0-f70.google.com [74.125.83.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 90222202DB for ; Mon, 20 Oct 2014 19:52:19 +0000 (UTC) Received: by mail-ee0-f70.google.com with SMTP id c13sf3000129eek.1 for ; Mon, 20 Oct 2014 12:52:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :mime-version:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe:content-type :content-transfer-encoding; bh=1s2vjUXXZLgG42X0JJGWh0f088agezCRjDklwkXkmsE=; b=BZ7DGwqfDC1OpSJF8QSA9Hqk9jSIWLmKaXOBItpmrhyx0i59AgZpahjsRmGxwss9zN TbBov9VXDqHUWVVhzxjbaNYscsLjk/+olqkUXR62/iwWs5v7+GO+9RQs6vp5fX4jPTEf 8K0RXORQiPcjPe27dg/vyarcyRH4cF6EgWdXg0JSKa0gJZiJxaVui0/Xwze1rYlvtEOP daXcDXUgu9HPOUj6lYZCEHjvJJguerM6F7Jfb6hC4DHp8FI7uwKBySIEqo75l9DIq1qr xUiy8ywldxCxlCmtS/2JX8HUDJ3DDytxgg9JO0zv2lMvAcBd9/5PojwAWPbfW4bHXHAq Rvsg== X-Gm-Message-State: ALoCoQmOwaw6O+xZC6k13T3bUQbaMo6h/k69+Qx9ucFlyHfpotX/xg0Stxf/9ZERYbY4V90IcNlv X-Received: by 10.152.28.4 with SMTP id x4mr816122lag.7.1413834738692; Mon, 20 Oct 2014 12:52:18 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.26.72 with SMTP id j8ls405012lag.105.gmail; Mon, 20 Oct 2014 12:52:18 -0700 (PDT) X-Received: by 10.112.180.198 with SMTP id dq6mr29270262lbc.56.1413834738417; Mon, 20 Oct 2014 12:52:18 -0700 (PDT) Received: from mail-lb0-f176.google.com (mail-lb0-f176.google.com. [209.85.217.176]) by mx.google.com with ESMTPS id rp2si15797130lbb.100.2014.10.20.12.52.18 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 20 Oct 2014 12:52:18 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.176 as permitted sender) client-ip=209.85.217.176; Received: by mail-lb0-f176.google.com with SMTP id p9so4476494lbv.21 for ; Mon, 20 Oct 2014 12:52:18 -0700 (PDT) X-Received: by 10.112.97.135 with SMTP id ea7mr29991738lbb.46.1413834738309; Mon, 20 Oct 2014 12:52:18 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.84.229 with SMTP id c5csp376426lbz; Mon, 20 Oct 2014 12:52:17 -0700 (PDT) X-Received: by 10.68.69.68 with SMTP id c4mr1525849pbu.168.1413834736715; Mon, 20 Oct 2014 12:52:16 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x8si8845799pde.76.2014.10.20.12.52.16 for ; Mon, 20 Oct 2014 12:52:16 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753122AbaJTTwN (ORCPT + 27 others); Mon, 20 Oct 2014 15:52:13 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:56541 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752081AbaJTTwL (ORCPT ); Mon, 20 Oct 2014 15:52:11 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id s9KJq4kR018135; Mon, 20 Oct 2014 14:52:05 -0500 Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id s9KJq4l0015873; Mon, 20 Oct 2014 14:52:04 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.3.174.1; Mon, 20 Oct 2014 14:52:05 -0500 Received: from legion.dal.design.ti.com (legion.dal.design.ti.com [128.247.22.53]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id s9KJq4Ef027555; Mon, 20 Oct 2014 14:52:04 -0500 Received: from localhost (j-172-22-150-104.vpn.ti.com [172.22.150.104]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id s9KJq4t11879; Mon, 20 Oct 2014 14:52:04 -0500 (CDT) From: Dan Murphy To: , CC: , , Dan Murphy Subject: [PATCH] iio: tsl4531: Fix compiler error when CONFIG_PM_OPS is not defined Date: Mon, 20 Oct 2014 14:52:02 -0500 Message-ID: <1413834722-7500-1-git-send-email-dmurphy@ti.com> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: dmurphy@ti.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.176 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Fix the compiler error when the CONFIG_PM_OPS flag is not set. drivers/iio/light/tsl4531.c:235:8: error: ‘tsl4531_suspend’ undeclared here (not in a function) drivers/iio/light/tsl4531.c:235:8: error: ‘tsl4531_resume’ undeclared here (not in a function) Signed-off-by: Dan Murphy --- drivers/iio/light/tsl4531.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/iio/light/tsl4531.c b/drivers/iio/light/tsl4531.c index a15006e..0763b86 100644 --- a/drivers/iio/light/tsl4531.c +++ b/drivers/iio/light/tsl4531.c @@ -230,9 +230,12 @@ static int tsl4531_resume(struct device *dev) return i2c_smbus_write_byte_data(to_i2c_client(dev), TSL4531_CONTROL, TSL4531_MODE_NORMAL); } -#endif static SIMPLE_DEV_PM_OPS(tsl4531_pm_ops, tsl4531_suspend, tsl4531_resume); +#define TSL4531_PM_OPS (&tsl4531_pm_ops) +#else +#define TSL4531_PM_OPS NULL +#endif static const struct i2c_device_id tsl4531_id[] = { { "tsl4531", 0 }, @@ -243,7 +246,7 @@ MODULE_DEVICE_TABLE(i2c, tsl4531_id); static struct i2c_driver tsl4531_driver = { .driver = { .name = TSL4531_DRV_NAME, - .pm = &tsl4531_pm_ops, + .pm = TSL4531_PM_OPS, .owner = THIS_MODULE, }, .probe = tsl4531_probe,