From patchwork Thu Feb 4 15:39:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 376285 Delivered-To: patch@linaro.org Received: by 2002:a02:b18a:0:0:0:0:0 with SMTP id t10csp1392654jah; Thu, 4 Feb 2021 07:41:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJy9BFwmvk8y4vL0egRG/WGKTJEhQOzlfAnNHjGt/ZOjz9KqWhB48B/UQSi1isq/LtfT2ZVv X-Received: by 2002:a17:906:ecb6:: with SMTP id qh22mr8677257ejb.252.1612453299697; Thu, 04 Feb 2021 07:41:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612453299; cv=none; d=google.com; s=arc-20160816; b=m72WVs5kXtThrpTw8foTJnJ1u447efE5YLqc2ECSh0aHuqn68UM9pJsPLeZJdHHni8 JKoj3/Z6Uxlq1wiLRcxgoaQqRPGk7bBjBTf5h8Oy4h/AHTzA7c0+7avHIMo7qoUalhq8 W5HRMVZLgp+wPqyh5FWf9/Ka7upX8WDUMhpFtRaGO/kM4C2sHqDvfq94ByXfifWNNszR 0cCi1AOIx+xkXYs0yVMQFctxDs/dIghpVLztkLLViaH5J8nGttSCMzBDSZ9BLi3Z4hA2 n6hHHU4Sddz6870bFa2UjLHZ3QPJ/jr+ynih8DcnpTp6hfynK7gzjQ9AkNBzzthMTZCz vXvw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=qiguiDSewh4UUY0+7Xg5IXNSHwW4gKXytG76s78FHkU=; b=mPcCB1NxrhYlRFvj75t9YyxzdYdSDNrFtl5IDKW+XEdFORk0FujNexhiV8qar3Hg+M 6Jpn2VsOTgegXzx0rvhkMbfITqEoRCkT7RCpw4K90Cb0rA9fSHhg1IeLl40meg+YmhiQ ngwnfeplo2O/0ygaQLhxTDoeqZ3G7heMg3V/6qrvkQtFGR5V3JvyLBK6DO57BUKMUZLE JJQtkL1KuhBeU9iWSEQR0c0lhbnT4H2dDN22fFepIKvA3wRpMHxf+l7YYSe4WGiqUxap BPWxW96jZaCt4C0Vy7p29rQS7pJeSb7No2zGqqAfxai/LrzRZhiPT3zp9XuRIsjztuH/ OKDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="H5sF/SYu"; spf=pass (google.com: domain of linux-leds-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-leds-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bs11si3428547ejb.637.2021.02.04.07.41.39 for ; Thu, 04 Feb 2021 07:41:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-leds-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=@kernel.org header.s=k20201202 header.b="H5sF/SYu"; spf=pass (google.com: domain of linux-leds-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-leds-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237476AbhBDPlK (ORCPT ); Thu, 4 Feb 2021 10:41:10 -0500 Received: from mail.kernel.org ([198.145.29.99]:60544 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237484AbhBDPkg (ORCPT ); Thu, 4 Feb 2021 10:40:36 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id CE22464F44; Thu, 4 Feb 2021 15:39:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1612453195; bh=0rVADc8DYJLXUAngr6xcgCUGDPQO+hMeabdF0zLfXo4=; h=From:To:Cc:Subject:Date:From; b=H5sF/SYuycmnMlgZhrvfUXPg0873Tnnv2nfG/NCRpXpfiu9mWOaW/GS88wyeziszZ bR3UkQ4kP0jbD7zfhCcpdJ02L+koBL5rhv7B7+89pZy7s5EDedVpgmRKSl5Oxy2OOU q8xvGCzmp4oU9ODpI23hN5y3YNM9WxwMDeUxlTtb4ECVfjXenMvV3ARd0LihO8buNY VZXazqBb8lXAWQC0cjmsg+w9Mjz0eDHO1kZfuO0PSAhHGkp4/HHlvyORqEwdCYG5Vx V6PR+Cj6EdAuEj3ONWO65KUFOYhogMthXXtm5jb3QIKegtsziVuK6REM3bE9IEarBh jdqgjSp1uicbQ== From: Arnd Bergmann To: Pavel Machek , Sakari Ailus , Linus Walleij Cc: Arnd Bergmann , Dan Murphy , linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] leds: rt8515: add V4L2_FLASH_LED_CLASS dependency Date: Thu, 4 Feb 2021 16:39:44 +0100 Message-Id: <20210204153951.1551156-1-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org From: Arnd Bergmann The leds-rt8515 driver can optionall use the v4l2 flash led class, but it causes a link error when that class is in a loadable module and the rt8515 driver itself is built-in: ld.lld: error: undefined symbol: v4l2_flash_init >>> referenced by leds-rt8515.c >>> leds/flash/leds-rt8515.o:(rt8515_probe) in archive drivers/built-in.a Adding 'depends on V4L2_FLASH_LED_CLASS' in Kconfig would avoid that, but it would make it impossible to use the driver without the v4l2 support. Add the same dependency that the other users of this class have instead, which just prevents the broken configuration. Fixes: e1c6edcbea13 ("leds: rt8515: Add Richtek RT8515 LED driver") Signed-off-by: Arnd Bergmann --- drivers/leds/flash/Kconfig | 1 + 1 file changed, 1 insertion(+) -- 2.29.2 Acked-by: Pavel Machek Reviewed-by: Linus Walleij diff --git a/drivers/leds/flash/Kconfig b/drivers/leds/flash/Kconfig index d21d273ef3da..b580b416b9a4 100644 --- a/drivers/leds/flash/Kconfig +++ b/drivers/leds/flash/Kconfig @@ -5,6 +5,7 @@ if LEDS_CLASS_FLASH config LEDS_RT8515 tristate "LED support for Richtek RT8515 flash/torch LED" depends on GPIOLIB + depends on V4L2_FLASH_LED_CLASS || !V4L2_FLASH_LED_CLASS help This option enables support for the Richtek RT8515 flash and torch LEDs found on some mobile phones.