From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BDE36C433E9 for ; Thu, 4 Feb 2021 15:42:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8DB9164F4D for ; Thu, 4 Feb 2021 15:42:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237562AbhBDPmV (ORCPT ); Thu, 4 Feb 2021 10:42:21 -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 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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(+) 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. -- 2.29.2