From patchwork Mon Mar 1 16:08:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 388728 Delivered-To: patch@linaro.org Received: by 2002:a02:290e:0:0:0:0:0 with SMTP id p14csp3645916jap; Mon, 1 Mar 2021 11:51:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJw5m+ykXUvpMeJ+TQYjH68bjIp74ScMs4sGQRs/elAcqzL1aAb/NdjEqtoMiA9H72X15wHu X-Received: by 2002:a05:6402:1383:: with SMTP id b3mr18125819edv.374.1614628302405; Mon, 01 Mar 2021 11:51:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614628302; cv=none; d=google.com; s=arc-20160816; b=ewP9WfgBJpcbbBMqfLGj/2RBNW0w3gkf0FQEr+36JBQRIsfKbh0RXffkQ3BrqRyuvC wrKjNF0Z8QTnQT5nuFFBWNiVATJ3tV5k6wFi8Yo/Sg1NcgAivODYU0BDXF+LP74LKkNh Xr+zY/Tuewf/YIBB8/J5aZGV8NnUJC5wvyOvPgr2eb8x6i1JRVDiePoLwBHv9rQ99dwy UKrFxq43Uu2joodsxPb/bjt63Bf0wcpk85q2V5RsygitAAU5oJRuZY5a9xgptDBPZiGZ HcICiz3gMyW1Vjnnm0GJKGmoWpVPu4GkXzR/GjY45Lf2h5Kszf2Wew3SK3bcbKq78HGl nrAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ugt/h0cIaDuKqpmcGdG39bvEn4kTWIZuflw8uSh775Q=; b=YagB9Za04BZqvigbfRtrC8JUrKo45fImG+Il/nGS4z2SS/0rqLRpaY7ypfe04Wq3gY eMUms24jqcaQF8c4G13utmMrA3u0n7GzWDmRs1sR058NIdDb4jPfmXlbSz/oQTuK/HHF TApJEFRAIYjf1n6ztLnq9OFEZd1tj8pi3DLEuC3A+osTknRC35c230pjHIa6sigYt7jF txpcpWVkIIBHcwL9/H78s3xBd6Pbh6TuBMwJ2TS4oF3EGuVQLV/NxQNjvNwQT9Pn9sCS vUo7RTc5iXsYiqeNR/nz+kJLlLsGmVOXKSeL4y6xw2sYwC/hVlbKzLA1l3LxpATH82DK WKLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="HzhPHMd/"; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q3si12018912ejt.322.2021.03.01.11.51.42; Mon, 01 Mar 2021 11:51:42 -0800 (PST) Received-SPF: pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="HzhPHMd/"; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242099AbhCATuw (ORCPT + 13 others); Mon, 1 Mar 2021 14:50:52 -0500 Received: from mail.kernel.org ([198.145.29.99]:53012 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241590AbhCATlV (ORCPT ); Mon, 1 Mar 2021 14:41:21 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id C0A4164F09; Mon, 1 Mar 2021 17:48:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1614620922; bh=NXJ/XzcRnMM+bqeIih9+MbcbbRotd2BEK71cIbAfxGU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HzhPHMd/sSZt7SswhhvuAn9VW5qbtEm3dpwnJ510JuBeeoM75gJtrA63wCLuNZUrG tLkZJZvy1t99ZVqJkzHwno+H1R9XZBUFsYzmMnFGIDnjhiMNNOReEab6Mw6HJPK34l VOpSdytz6HOS+IJy18Ir4I5wZtadaS5+AiG3ZFJ0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann , Alexandre Belloni , Sasha Levin Subject: [PATCH 5.11 327/775] rtc: rx6110: fix build against modular I2C Date: Mon, 1 Mar 2021 17:08:15 +0100 Message-Id: <20210301161217.778192074@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210301161201.679371205@linuxfoundation.org> References: <20210301161201.679371205@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Arnd Bergmann [ Upstream commit def8550f543e6c9101f3e1a03160b2aab8c02e8a ] With CONFIG_I2C=m, the #ifdef section is disabled, as shown by this warning: drivers/rtc/rtc-rx6110.c:314:12: error: unused function 'rx6110_probe' [-Werror,-Wunused-function] Change the driver to use IS_ENABLED() instead, which works for both module and built-in subsystems. Fixes: afa819c2c6bf ("rtc: rx6110: add i2c support") Signed-off-by: Arnd Bergmann Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20201230145938.3254459-1-arnd@kernel.org Signed-off-by: Sasha Levin --- drivers/rtc/rtc-rx6110.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.27.0 diff --git a/drivers/rtc/rtc-rx6110.c b/drivers/rtc/rtc-rx6110.c index a7b671a210223..79161d4c6ce4d 100644 --- a/drivers/rtc/rtc-rx6110.c +++ b/drivers/rtc/rtc-rx6110.c @@ -331,7 +331,7 @@ static int rx6110_probe(struct rx6110_data *rx6110, struct device *dev) return 0; } -#ifdef CONFIG_SPI_MASTER +#if IS_ENABLED(CONFIG_SPI_MASTER) static struct regmap_config regmap_spi_config = { .reg_bits = 8, .val_bits = 8, @@ -411,7 +411,7 @@ static void rx6110_spi_unregister(void) } #endif /* CONFIG_SPI_MASTER */ -#ifdef CONFIG_I2C +#if IS_ENABLED(CONFIG_I2C) static struct regmap_config regmap_i2c_config = { .reg_bits = 8, .val_bits = 8,