From patchwork Sat Mar 21 08:15:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Denis OSTERLAND-HEIM X-Patchwork-Id: 209137 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=-8.1 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_2 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 2B0E0C4332B for ; Sat, 21 Mar 2020 08:16:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0262D20753 for ; Sat, 21 Mar 2020 08:16:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=diehl.com header.i=@diehl.com header.b="Jo9ESMpk" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728262AbgCUIQK (ORCPT ); Sat, 21 Mar 2020 04:16:10 -0400 Received: from enterprise01.smtp.diehl.com ([193.201.238.219]:12449 "EHLO enterprise01.smtp.diehl.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728247AbgCUIQJ (ORCPT ); Sat, 21 Mar 2020 04:16:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=diehl.com; i=@diehl.com; q=dns/txt; s=default; t=1584778569; x=1616314569; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=PZZKSh2KXGWrjP7LgCelpSRuWflVunnD5QhUJZ1nsBQ=; b=Jo9ESMpkOwP1MqlmPWDhFyYTt3uH8lRRhEm1PY60wUTO9zdsvX0BQdj+ SPzPwJG7fY9AcEQZMn2FDYFtCyOAD8iBA65ob9QIDv/1XWA3AyUTmzHsQ ywrgPdjro6oQ8hSIQfxAeWQ1OTUPUG7wAylfUPecAMdH4CFLBjgZpiG4v 7208Mb7SbtfK7qMYk53CeaXR7sdN5kQaS77qEYMFODOPD3dzcCf9yXN2m eQ5YIWQvaDk4sJaBV59bzewYlafhHm+3pAToFuSrk0TXEJ7icAZ9NArwQ Zrq0VJ3CnvJrp3Vw/Zd3yOyCaUBK/EhIJ4zP52WNtVVmeJSlwc5mQ4yJG g==; IronPort-SDR: nREVm1FwUL51wSzUEnDLB/DUwVk1OK6CQh1CH+YktPy9KeKGqc9kpzPl1C5IC6pnXcnatbujsG UnyLQn1RaDNA== From: Denis Osterland-Heim To: "dmurphy@ti.com" , "pavel@ucw.cz" , "mark.rutland@arm.com" , "jacek.anaszewski@gmail.com" , "robh+dt@kernel.org" CC: "linux-kernel@vger.kernel.org" , "Denis Osterland-Heim" , "linux-leds@vger.kernel.org" , "devicetree@vger.kernel.org" Subject: [PATCH v4 1/5] leds: pwm: remove header Thread-Topic: [PATCH v4 1/5] leds: pwm: remove header Thread-Index: AQHV/1jw95ejBv9Q1kWuOGZzdTUiGA== Date: Sat, 21 Mar 2020 08:15:53 +0000 Message-ID: <20200321081321.15614-2-Denis.Osterland@diehl.com> References: <20200321081321.15614-1-Denis.Osterland@diehl.com> In-Reply-To: <20200321081321.15614-1-Denis.Osterland@diehl.com> Accept-Language: de-DE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: Evolution 3.28.5-0ubuntu0.18.04.1 x-ms-exchange-messagesentrepresentingtype: 1 MIME-Version: 1.0 X-TrailerSkip: 1 X-GBS-PROC: PkB65aL1SqtESF35r/jQn7YYrFe7TNyCmnU8Zv2PHXoOZwPucGHZVz6NcGmC5daB Sender: linux-leds-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org The header is only used by leds_pwm.c, so move contents to leds_pwm.c and remove it. Apply minor changes suggested by checkpatch. Remove deprecated and unused pwm_id member. Suggested-by: Pavel Machek Signed-off-by: Denis Osterland-Heim --- drivers/leds/leds-pwm.c | 14 +++++++++++++- include/linux/leds_pwm.h | 22 ---------------------- 2 files changed, 13 insertions(+), 23 deletions(-) delete mode 100644 include/linux/leds_pwm.h diff --git a/drivers/leds/leds-pwm.c b/drivers/leds/leds-pwm.c index 9111cdede0ee..e1848e80aeb4 100644 --- a/drivers/leds/leds-pwm.c +++ b/drivers/leds/leds-pwm.c @@ -16,9 +16,21 @@ #include #include #include -#include #include +struct led_pwm { + const char *name; + const char *default_trigger; + u8 active_low; + unsigned int max_brightness; + unsigned int pwm_period_ns; +}; + +struct led_pwm_platform_data { + int num_leds; + struct led_pwm *leds; +}; + struct led_pwm_data { struct led_classdev cdev; struct pwm_device *pwm; diff --git a/include/linux/leds_pwm.h b/include/linux/leds_pwm.h deleted file mode 100644 index 93d101d28943..000000000000 --- a/include/linux/leds_pwm.h +++ /dev/null @@ -1,22 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -/* - * PWM LED driver data - see drivers/leds/leds-pwm.c - */ -#ifndef __LINUX_LEDS_PWM_H -#define __LINUX_LEDS_PWM_H - -struct led_pwm { - const char *name; - const char *default_trigger; - unsigned pwm_id __deprecated; - u8 active_low; - unsigned max_brightness; - unsigned pwm_period_ns; -}; - -struct led_pwm_platform_data { - int num_leds; - struct led_pwm *leds; -}; - -#endif From patchwork Sat Mar 21 08:15:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Denis OSTERLAND-HEIM X-Patchwork-Id: 209139 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=-8.1 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_2 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 6DEE6C4332E for ; Sat, 21 Mar 2020 08:16:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3FFA720658 for ; Sat, 21 Mar 2020 08:16:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=diehl.com header.i=@diehl.com header.b="Vl//KZYC" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728207AbgCUIQB (ORCPT ); Sat, 21 Mar 2020 04:16:01 -0400 Received: from enterprise02.smtp.diehl.com ([193.201.238.220]:35341 "EHLO enterprise02.smtp.diehl.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728040AbgCUIQA (ORCPT ); Sat, 21 Mar 2020 04:16:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=diehl.com; i=@diehl.com; q=dns/txt; s=default; t=1584778559; x=1616314559; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=KperK5pY8kDhUqv+XcVZUo8pjHw5XqETzsLRKfvjUgc=; b=Vl//KZYCLa8h86kj8J8zm0YoffLodTeYvkedYcBq2hf9m1pvGCyd71NA cA04Jyp/uyMGNtXPNBreTbbhAZI1xDcncTD1OavccQAN2QHODk7o773pY Iss8ldl/PgHtbkTkVAxZehr7MraYRDGMETdqkZCeie4e9HFdpyfCfxUgD fEYWHQegSad1LzlkfXyMHhQtPqai/oZoDpDTo2S/B5XNgg+eP8588K43Y oMm709ZHTfn7poVBvhRlaipOKoyN7L7Cc1vj6Z4BaCJ+/tQuK8CxiF+uo JOVZ7yd+li8LPr77jcuWSmryAyu0VW5TWg2VV/4VrRwvGzPZWrnGwfhoH w==; IronPort-SDR: QIVQuVDqT7ODlWyKM+cZVX3U80JAGzto8mXohnvsz+/Gl3mdTBGLzoId1Hnq8UieJQbkaC/5I1 bXovyx8RG8GQ== From: Denis Osterland-Heim To: "dmurphy@ti.com" , "pavel@ucw.cz" , "mark.rutland@arm.com" , "jacek.anaszewski@gmail.com" , "robh+dt@kernel.org" CC: "linux-kernel@vger.kernel.org" , "Denis Osterland-Heim" , "linux-leds@vger.kernel.org" , "devicetree@vger.kernel.org" Subject: [PATCH v4 2/5] leds: pwm: remove useless pwm_period_ns Thread-Topic: [PATCH v4 2/5] leds: pwm: remove useless pwm_period_ns Thread-Index: AQHV/1jw0S0BPC/2zkeJqXSW2+rxlw== Date: Sat, 21 Mar 2020 08:15:53 +0000 Message-ID: <20200321081321.15614-3-Denis.Osterland@diehl.com> References: <20200321081321.15614-1-Denis.Osterland@diehl.com> In-Reply-To: <20200321081321.15614-1-Denis.Osterland@diehl.com> Accept-Language: de-DE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: Evolution 3.28.5-0ubuntu0.18.04.1 x-ms-exchange-messagesentrepresentingtype: 1 MIME-Version: 1.0 X-TrailerSkip: 1 X-GBS-PROC: 415AWy8o668fDtCxszluz3Qkyqh7rcy46kDTEvbxZbX6ZbOs5H4UIh8DDIXSwv9+ Sender: linux-leds-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org This member seems to was a way to pass PWM period to the LED. Since there is no header anymore, this is useless. Signed-off-by: Denis Osterland-Heim --- drivers/leds/leds-pwm.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/leds/leds-pwm.c b/drivers/leds/leds-pwm.c index e1848e80aeb4..6caf8bea8cd5 100644 --- a/drivers/leds/leds-pwm.c +++ b/drivers/leds/leds-pwm.c @@ -23,7 +23,6 @@ struct led_pwm { const char *default_trigger; u8 active_low; unsigned int max_brightness; - unsigned int pwm_period_ns; }; struct led_pwm_platform_data { @@ -91,9 +90,6 @@ static int led_pwm_add(struct device *dev, struct led_pwm_priv *priv, pwm_init_state(led_data->pwm, &led_data->pwmstate); - if (!led_data->pwmstate.period) - led_data->pwmstate.period = led->pwm_period_ns; - ret = devm_led_classdev_register(dev, &led_data->cdev); if (ret == 0) { priv->num_leds++;