Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp4589338ybf; Wed, 4 Mar 2020 06:55:38 -0800 (PST) X-Google-Smtp-Source: ADFU+vvbY+4Vpk8GSYd4uMEkbXf1xFMxtpgzU5sJF2YmDVxOTtcKAnJ3HzkoJj32koT9TAVgfiIO X-Received: by 2002:aca:3542:: with SMTP id c63mr2001235oia.135.1583333738801; Wed, 04 Mar 2020 06:55:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583333738; cv=none; d=google.com; s=arc-20160816; b=yV/eIh07ae5KcvLRe6dPAhJD6P9TofUhIH3OKB/craoowTb5zquO+PVIeUOhWNZxSp GlbztBLWaL8CkImX3cIuJ2YGSGgOwBwl8aI/18YRlflTEFvepw0XkDfpz0Pk7DfcV19i O0Sd8gEib3Tes0NPayb9IAx8iGru0U56F53iitRF67NPIxbXEAeD3xRlu7Re/k7oezxK PjBG7JzLnOClT99IShhljGB4ls7j2GVJZ+kHNejhxsNb6cqU8UkyjODsNgIDNFy/1DZg aqoCb3l8SbUIhVfCuNPh5x1cLbmOyN2OMAoVXVCocVar91r/m+q9VqFOdw/QcOTyrhsm sP5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=ZChEYPKFMPqx0LOq+ynVDmhX9CwijdHjq9qkixJAcPY=; b=nPedvSN2DQAuDUMD2QTZM2IccSggtoHmVWfxR9jZyhM+TUoJIkTx7lo4VDzcdRsPbk KQ+hwuHJuSYDj/nIBix1UuaQhbajTpSzBdK9BciDq2Kl0+ozKXaSKfBJqWgq8Stv5iNe 5/iufmv/oq0Zctc7Fw5PmpP5rkpjuGWOBLF2vJdDzxMQD/b3LrvwJwg1KC2SUEBnqcdw 4eZcgayh7YpH1klWk5yJxhY8VYLIDGr1vw0LT6xBOtMFy5Y9sMO4S3MwM4z+g8YIzGMv Onl14GpGNOFVO/DkmJvMQkBL7/RdZxgnnfJEaJTUjkA5Qt5I/zWOe2LyotCiZSKq9yy8 xegg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k1si1286647oic.245.2020.03.04.06.55.24; Wed, 04 Mar 2020 06:55:38 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726740AbgCDOy2 (ORCPT + 99 others); Wed, 4 Mar 2020 09:54:28 -0500 Received: from foss.arm.com ([217.140.110.172]:35372 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725795AbgCDOy2 (ORCPT ); Wed, 4 Mar 2020 09:54:28 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 4C8B431B; Wed, 4 Mar 2020 06:54:27 -0800 (PST) Received: from e119884-lin.cambridge.arm.com (e119884-lin.cambridge.arm.com [10.1.196.72]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 16F413F6CF; Wed, 4 Mar 2020 06:54:25 -0800 (PST) From: Vincenzo Frascino To: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: Vincenzo Frascino , "James (Qian) Wang" , Liviu Dudau , Mihail Atanassov , Brian Starkey , David Airlie , Daniel Vetter Subject: [PATCH] drm: komeda: Make rt_pm_ops dependent on CONFIG_PM Date: Wed, 4 Mar 2020 14:54:12 +0000 Message-Id: <20200304145412.33936-1-vincenzo.frascino@arm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org komeda_rt_pm_suspend() and komeda_rt_pm_resume() are compiled only when CONFIG_PM is enabled. Having it disabled triggers the following warning at compile time: linux/drivers/gpu/drm/arm/display/komeda/komeda_drv.c:156:12: warning: ‘komeda_rt_pm_resume’ defined but not used [-Wunused-function] static int komeda_rt_pm_resume(struct device *dev) ^~~~~~~~~~~~~~~~~~~ linux/drivers/gpu/drm/arm/display/komeda/komeda_drv.c:149:12: warning: ‘komeda_rt_pm_suspend’ defined but not used [-Wunused-function] static int komeda_rt_pm_suspend(struct device *dev) Make komeda_rt_pm_suspend() and komeda_rt_pm_resume() dependent on CONFIG_PM to address the issue. Cc: "James (Qian) Wang" Cc: Liviu Dudau Cc: Mihail Atanassov Cc: Brian Starkey Cc: David Airlie Cc: Daniel Vetter Signed-off-by: Vincenzo Frascino --- drivers/gpu/drm/arm/display/komeda/komeda_drv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_drv.c b/drivers/gpu/drm/arm/display/komeda/komeda_drv.c index ea5cd1e17304..dd3ae3d88687 100644 --- a/drivers/gpu/drm/arm/display/komeda/komeda_drv.c +++ b/drivers/gpu/drm/arm/display/komeda/komeda_drv.c @@ -146,6 +146,7 @@ static const struct of_device_id komeda_of_match[] = { MODULE_DEVICE_TABLE(of, komeda_of_match); +#ifdef CONFIG_PM static int komeda_rt_pm_suspend(struct device *dev) { struct komeda_drv *mdrv = dev_get_drvdata(dev); @@ -159,6 +160,7 @@ static int komeda_rt_pm_resume(struct device *dev) return komeda_dev_resume(mdrv->mdev); } +#endif /* CONFIG_PM */ static int __maybe_unused komeda_pm_suspend(struct device *dev) { -- 2.25.1