From patchwork Tue Jan 3 13:12:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 639161 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1F793C54EBD for ; Tue, 3 Jan 2023 13:12:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230459AbjACNMh (ORCPT ); Tue, 3 Jan 2023 08:12:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52548 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237656AbjACNMg (ORCPT ); Tue, 3 Jan 2023 08:12:36 -0500 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EFAD8EE37; Tue, 3 Jan 2023 05:12:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1672751556; x=1704287556; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=NEeFuL7s2HGlJGPjMrfp/6jwPjBk7uYpbdHP2kx39AA=; b=N74I6rDUI5LY4crRUGj9Iw/6qTocz4VKc5ogvmNc/Hr4AU7ArIHGxlnt kFnPQ6i/q48IrbAq4rul2XqQlX2K8GptalEIOZVC4eSBTWxxoX3l9LPxA yCL3wfdc7iwnphLOBnCg9i3ACyoLjZ0aTWhuRBjZr6B8x8TCmrKqOvWaW yWXcCLqJZPjsTD+/od2Es9fdfcUfqu3TTAZWOihJMgvasNwQe6tqzO+0I p+YujOSlXFquA/REbNRHPIrt3lPVvWObr1yFLw3l9pr+GSQKGD3Bijdpw p+KB5AU1a8ON3jj370R38G/H1mu9IbC+f/AyPou16ki0jc4SB+XtaMHeF Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10579"; a="322887894" X-IronPort-AV: E=Sophos;i="5.96,297,1665471600"; d="scan'208";a="322887894" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jan 2023 05:12:33 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10579"; a="685397925" X-IronPort-AV: E=Sophos;i="5.96,297,1665471600"; d="scan'208";a="685397925" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga008.jf.intel.com with ESMTP; 03 Jan 2023 05:12:28 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 85BF21CA; Tue, 3 Jan 2023 15:13:00 +0200 (EET) From: Andy Shevchenko To: Andy Shevchenko , Gene Chen , 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 , Lee Jones , Matthias Brugger , Sean Wang , Kurt Kanzenbach , Andrew Lunn , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Subject: [PATCH v4 02/11] leds: Move led_init_default_state_get() to the global header Date: Tue, 3 Jan 2023 15:12:47 +0200 Message-Id: <20230103131256.33894-3-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20230103131256.33894-1-andriy.shevchenko@linux.intel.com> References: <20230103131256.33894-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.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; };