From patchwork Tue Sep 6 13:49:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 12967576 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B3B42ECAAD5 for ; Tue, 6 Sep 2022 14:14:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=oVArDv0lIfvc7Grsn0zO3GkVHpa3SVAzDsMkv50A9yY=; b=DXI5PxeQuRGbLWE1U4qiMALrJg 7jW6NqP8TuZV7R1hD1fW/TTgiI6MDk5Um3YYvl3gimEWTFGYyYZQphuTCm5y5e4M7jWWcIP16F2Mg +20Ar6NmuFr5fs4p27+yXhvZUXNcbvvLggwqlJ7K763hGgq5Z8MTUID9zG6ko83jmHWxySiEtpWxh QlxDS9hTeEKjckp8HB6ESBTX57GxsGTn5BaufKMJlgjq4ADOX1aO2ZT1JKXee10yWxF4Vg0BnEOOL BQt5IgKzV7ZEI0k75ayYIK0PXcJHcy/sPVTV1CLt4W/EZWzDNnrml/Hzou6gAwF6AcrDODtlnOZ22 z/W280+Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oVZLd-00ECCc-BC; Tue, 06 Sep 2022 14:14:41 +0000 Received: from mga11.intel.com ([192.55.52.93]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oVYxo-00Dzog-2G; Tue, 06 Sep 2022 13:50:08 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1662472204; x=1694008204; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=NEeFuL7s2HGlJGPjMrfp/6jwPjBk7uYpbdHP2kx39AA=; b=eg9yVAPNTw+NPDQDSnTK6uHaInsCh/nlQrf275Cul0QOSdf8ZFZUijL6 Qs/IPG05tQNyPM5sRRMWw8R3hUf3kHTF+GHy7KP3RTTr824Mg7HuszePL EbNdAe2ApRXvlHEKiPF8Fk/fO7oIhpZPu1mhQVTe8wx4z4O3cxIZ1rFvv Zt9Pxh6O8j1ekHKzi9e6Qn+DKKBfxoMzm1hJepxc05RAcNmGvXfsg5Jhb XmuaQ1IeM9yoWO7eTThEYg1kCwkgtKhw8bgsjOwKnnuZFOJsxTUS/hHcG UPNyNdMRoPZ0J9GJX6h2lUdYS2gm+3QO/+G4Ur4Morh7M7F9fq7tc531v g==; X-IronPort-AV: E=McAfee;i="6500,9779,10462"; a="294181881" X-IronPort-AV: E=Sophos;i="5.93,294,1654585200"; d="scan'208";a="294181881" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Sep 2022 06:50:02 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,294,1654585200"; d="scan'208";a="616712869" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga007.fm.intel.com with ESMTP; 06 Sep 2022 06:49:54 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 6404F363; Tue, 6 Sep 2022 16:50:10 +0300 (EEST) From: Andy Shevchenko To: Gene Chen , Andy Shevchenko , Andrew Jeffery , linux-leds@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Cc: Pavel Machek , Matthias Brugger , Sean Wang , Kurt Kanzenbach , Andrew Lunn , Vivien Didelot , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Lee Jones Subject: [PATCH v3 02/11] leds: Move led_init_default_state_get() to the global header Date: Tue, 6 Sep 2022 16:49:55 +0300 Message-Id: <20220906135004.14885-3-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220906135004.14885-1-andriy.shevchenko@linux.intel.com> References: <20220906135004.14885-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220906_065004_166834_0596EB06 X-CRM114-Status: GOOD ( 14.07 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org There are users inside and outside LED framework that have implemented a local copy of led_init_default_state_get(). In order to deduplicate that, as the first step move the declaration from LED header to the global one. Signed-off-by: Andy Shevchenko --- drivers/leds/leds.h | 1 - include/linux/leds.h | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/leds/leds.h b/drivers/leds/leds.h index aa64757a4d89..345062ccabda 100644 --- a/drivers/leds/leds.h +++ b/drivers/leds/leds.h @@ -27,7 +27,6 @@ ssize_t led_trigger_read(struct file *filp, struct kobject *kobj, ssize_t led_trigger_write(struct file *filp, struct kobject *kobj, struct bin_attribute *bin_attr, char *buf, loff_t pos, size_t count); -enum led_default_state led_init_default_state_get(struct fwnode_handle *fwnode); extern struct rw_semaphore leds_list_lock; extern struct list_head leds_list; diff --git a/include/linux/leds.h b/include/linux/leds.h index 499aea1e59b9..b96feacc73f8 100644 --- a/include/linux/leds.h +++ b/include/linux/leds.h @@ -67,6 +67,8 @@ struct led_init_data { bool devname_mandatory; }; +enum led_default_state led_init_default_state_get(struct fwnode_handle *fwnode); + struct led_hw_trigger_type { int dummy; };