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 X-Patchwork-Id: 2350741 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 8AD3A3FC8C for ; Wed, 27 Mar 2013 13:53:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751613Ab3C0Nxl (ORCPT ); Wed, 27 Mar 2013 09:53:41 -0400 Received: from mail-pb0-f50.google.com ([209.85.160.50]:38475 "EHLO mail-pb0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751310Ab3C0Nxk (ORCPT ); Wed, 27 Mar 2013 09:53:40 -0400 Received: by mail-pb0-f50.google.com with SMTP id jt11so1015822pbb.9 for ; Wed, 27 Mar 2013 06:53:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:x-gm-message-state; bh=mvR0UYJFIOGKCB6f9goWD+mRrdngAqnkYfUPgdIlInE=; b=dDtlAsWICzbRvIHNtrqY4v6L3QhLjzxu/vVECaGFYk9Tcd9cYpTjZ/5F3+vasdb2di 09ZFDPUR6LvI0zFZY3mnu4JWN+pelj4X/BdKdZjqWXRG0v42kEo9srHaClhLLL3Dy8Ak qsABsvFwkH21qKCLJEsWjBKoGwCyH3NTQmzVC/9cfe0T6u4UKlhpCkKrv4iyFGDLV4Jv nm7OGaBftpd7cVDoG5T+4S5iOO7pSfWcg0b444ylKVjSSNdpKXghBgpMXtEf7MSTpdCI pDnbWrF5EH9+LHElfVfIM4bKdFle1rXxUrVNjUgfBfnlP3G1upgc2b3Y1OBwb/TsZ2Qy p7Iw== 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: ALoCoQlHzIA2TuhAlIzBrr6oagyhkiazyQerpn1c1isX1LGM0OGF87CDE/GUY4VKEN6C1fEDwWX9 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org 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;