From patchwork Wed Mar 27 13:52:53 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: rajagopal.venkat@linaro.org X-Patchwork-Id: 15699 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 531CE23EB1 for ; Wed, 27 Mar 2013 13:53:42 +0000 (UTC) Received: from mail-vb0-f44.google.com (mail-vb0-f44.google.com [209.85.212.44]) by fiordland.canonical.com (Postfix) with ESMTP id 0FE21A18243 for ; Wed, 27 Mar 2013 13:53:41 +0000 (UTC) Received: by mail-vb0-f44.google.com with SMTP id fr13so5200020vbb.17 for ; Wed, 27 Mar 2013 06:53:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state; bh=mvR0UYJFIOGKCB6f9goWD+mRrdngAqnkYfUPgdIlInE=; b=S3uv0K2QK4nkjZWJP8GXX+psXjG8udfQ18EmX1Z1jePmcUwfow9NXzgU7tdDGgC0e/ ZlPrQWzEybdRQhzf6iaAA8oyf6rqm/0bA8MkJer7iN+gZ8aexsryZncCC3+wz3Y2VEX+ B77tjyhpumRQuTM0u6HyOhhc7aVKUTHGQNDRGkymM2peUvn5SZR/pDOt1uK9DWBPXeIb k2ryamL3jjF4DsOxm+iq6kFJB6JmfGz0KFEpxt8eZKbTznsvVafa2YeSoUlVNI5NfSJU mfjqBvDo2RK8OhylOQ01c9MKy7mO2Jc4kRR6V8LFqDGyY3Q/jhfCopeoF5MS51cq/e8g nBVQ== X-Received: by 10.58.210.200 with SMTP id mw8mr23375939vec.32.1364392421529; Wed, 27 Mar 2013 06:53:41 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.59.4.204 with SMTP id cg12csp117033ved; Wed, 27 Mar 2013 06:53:40 -0700 (PDT) X-Received: by 10.68.34.230 with SMTP id c6mr29114274pbj.211.1364392420388; Wed, 27 Mar 2013 06:53:40 -0700 (PDT) Received: from mail-pd0-f181.google.com (mail-pd0-f181.google.com [209.85.192.181]) by mx.google.com with ESMTPS id j10si22386695pac.339.2013.03.27.06.53.40 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 27 Mar 2013 06:53:40 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.192.181 is neither permitted nor denied by best guess record for domain of rajagopal.venkat@linaro.org) client-ip=209.85.192.181; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.192.181 is neither permitted nor denied by best guess record for domain of rajagopal.venkat@linaro.org) smtp.mail=rajagopal.venkat@linaro.org Received: by mail-pd0-f181.google.com with SMTP id q10so3544039pdj.40 for ; Wed, 27 Mar 2013 06:53:40 -0700 (PDT) X-Received: by 10.68.189.42 with SMTP id gf10mr29320349pbc.149.1364392419993; Wed, 27 Mar 2013 06:53:39 -0700 (PDT) Received: from localhost.localdomain ([115.242.178.247]) by mx.google.com with ESMTPS id ve7sm23501613pab.11.2013.03.27.06.53.33 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 27 Mar 2013 06:53:39 -0700 (PDT) From: Rajagopal Venkat To: myungjoo.ham@samsung.com, rjw@sisk.pl, Kevin Hilman , Alan Stern Cc: patches@linaro.org, linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Rajagopal Venkat Subject: [PATCH v2 1/2] PM / devfreq: Fix compiler warnings Date: Wed, 27 Mar 2013 19:22:53 +0530 Message-Id: <1364392374-12236-2-git-send-email-rajagopal.venkat@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1364392374-12236-1-git-send-email-rajagopal.venkat@linaro.org> References: <1364392374-12236-1-git-send-email-rajagopal.venkat@linaro.org> X-Gm-Message-State: ALoCoQl5vknFGHARGq2pAmRRDszOe19tSDiMeEvUj0oijpEC/iebMSIbJWtnzAAC/UyMiEUTfHL7 Fix compiler warnings generated when devfreq is not enabled (CONFIG_PM_DEVFREQ is not set). Signed-off-by: Rajagopal Venkat Acked-by: MyungJoo Ham --- include/linux/devfreq.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/include/linux/devfreq.h b/include/linux/devfreq.h index 04ad61d..5f1ab92 100644 --- a/include/linux/devfreq.h +++ b/include/linux/devfreq.h @@ -215,7 +215,7 @@ struct devfreq_simple_ondemand_data { #endif #else /* !CONFIG_PM_DEVFREQ */ -static struct devfreq *devfreq_add_device(struct device *dev, +static inline struct devfreq *devfreq_add_device(struct device *dev, struct devfreq_dev_profile *profile, const char *governor_name, void *data) @@ -223,34 +223,34 @@ static struct devfreq *devfreq_add_device(struct device *dev, return NULL; } -static int devfreq_remove_device(struct devfreq *devfreq) +static inline int devfreq_remove_device(struct devfreq *devfreq) { return 0; } -static int devfreq_suspend_device(struct devfreq *devfreq) +static inline int devfreq_suspend_device(struct devfreq *devfreq) { return 0; } -static int devfreq_resume_device(struct devfreq *devfreq) +static inline int devfreq_resume_device(struct devfreq *devfreq) { return 0; } -static struct opp *devfreq_recommended_opp(struct device *dev, +static inline struct opp *devfreq_recommended_opp(struct device *dev, unsigned long *freq, u32 flags) { - return -EINVAL; + return ERR_PTR(-EINVAL); } -static int devfreq_register_opp_notifier(struct device *dev, +static inline int devfreq_register_opp_notifier(struct device *dev, struct devfreq *devfreq) { return -EINVAL; } -static int devfreq_unregister_opp_notifier(struct device *dev, +static inline int devfreq_unregister_opp_notifier(struct device *dev, struct devfreq *devfreq) { return -EINVAL;