Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp754054pxk; Thu, 17 Sep 2020 15:37:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyHsjYGSfLUWOmsMo8alYgboyQoPZ4+wveQMv79UbiJmrtIZhAmlOZvAsvdy/9iXeoba9AP X-Received: by 2002:a50:8881:: with SMTP id d1mr35756551edd.306.1600382230084; Thu, 17 Sep 2020 15:37:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600382230; cv=none; d=google.com; s=arc-20160816; b=URnNZAWrRIC7k3zwh6b4ew9URkKgFnlVHZb9FYpWu2UO0ULOCSG2C/QsBIjdTdldwN BN4nw3l0FzOuwG9vAdRWLm8QW/f1Ei6tWul+S9GfrWdxqSH2kf2uLkAONAT+LPH/azv7 EmawppQACxIsh6mFmJTEeeRALP9oail/qRCKWiYKxhqeqxf+J+lkpS3vPMuoVWa8Sox8 Wb3c9A9hmP+iKiDEg4TN7jE5mBeGTVFElRbD24+Gt8PtcgsAmuaglbsmHrvJEiXuMeeB rxsaT4q4hz2xeU8WSJjHgGCNb2eAWdIVMmNR8t5YDn+WnNhmfDg9qKlEXBWtrh3SkcZn P4Vw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=YUoM43ulXlFsGfDCjyetkiyPFz2kHCutn2RLmvpMI78=; b=v/5ykVUn2F1tTwVY3gH86wWsN7X3de77AsBPV8tBlG2OtAuAgw2Ks1Kf2y2F7ma8Tj y+uw+ZQDKBCVl/BmpzRnDi693CJpMTgOMaCdoEOsuv4CkYCNSkgX8nZosEmLrz4aCm4S Yqa8y8cB7tVbUbSpyhXSIRSsQNVOMwrQh3GqdOacngYwm8+o8Ugxg/9VEuGf0DmNDFL1 MitpIl9gO1uIABniNNHxCwo5ZG7PIoelDtlFCekPsTQ33svO6Yn9/GNrZsCX19UJtXi5 pAo+S0UCx+J2i392Ygpjr+1cTj3aaUyz3jOanTmI5bihFx0w/mPCOAh0GAiw8q+fdhVV HkGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nic.cz header.s=default header.b=cjDZMrC7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nic.cz Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w2si854678ejq.644.2020.09.17.15.36.46; Thu, 17 Sep 2020 15:37:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@nic.cz header.s=default header.b=cjDZMrC7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nic.cz Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726653AbgIQWfH (ORCPT + 99 others); Thu, 17 Sep 2020 18:35:07 -0400 Received: from mail.nic.cz ([217.31.204.67]:35610 "EHLO mail.nic.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726305AbgIQWeO (ORCPT ); Thu, 17 Sep 2020 18:34:14 -0400 Received: from dellmb.labs.office.nic.cz (unknown [IPv6:2001:1488:fffe:6:cac7:3539:7f1f:463]) by mail.nic.cz (Postfix) with ESMTP id D5654142061; Fri, 18 Sep 2020 00:34:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nic.cz; s=default; t=1600382041; bh=0KVIVwBwEdjiOA3ZbJRB3ki9LPpAzNlds5sDz/L7rmI=; h=From:To:Date; b=cjDZMrC7M34OWVTVBS17ThFU/4ydlnuSBwFKgVihIHw3FsXynKyNi1V//iyh+MUV8 tPPGVprwImenOO6Fq/Ebjojzl7i0PKI5dqDzoO1cJxmZ6TpJLaJQLBEqZ9g5lJbvYS 7vdQyAmtBskU9x84L7PQjo8dJ4BfbV9WPrCXzJqo= From: =?UTF-8?q?Marek=20Beh=C3=BAn?= To: linux-leds@vger.kernel.org Cc: Pavel Machek , Dan Murphy , =?UTF-8?q?Ond=C5=99ej=20Jirman?= , linux-kernel@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org, =?UTF-8?q?Marek=20Beh=C3=BAn?= , Simon Guinot , Simon Guinot , Vincent Donnefort , Thomas Petazzoni , Linus Walleij Subject: [PATCH leds v2 41/50] leds: ns2: cosmetic structure rename Date: Fri, 18 Sep 2020 00:33:29 +0200 Message-Id: <20200917223338.14164-42-marek.behun@nic.cz> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200917223338.14164-1-marek.behun@nic.cz> References: <20200917223338.14164-1-marek.behun@nic.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail.nic.cz X-Spam-Status: No, score=0.00 X-Spamd-Bar: / X-Virus-Scanned: clamav-milter 0.102.2 at mail X-Virus-Status: Clean Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Rename structures: ns2_led -> ns2_led_of_one ns2_led_data -> ns2_led. Signed-off-by: Marek BehĂșn Cc: Simon Guinot Cc: Simon Guinot Cc: Vincent Donnefort Cc: Thomas Petazzoni Cc: Linus Walleij --- drivers/leds/leds-ns2.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/drivers/leds/leds-ns2.c b/drivers/leds/leds-ns2.c index fa06ab40ee143..6dba6208433ca 100644 --- a/drivers/leds/leds-ns2.c +++ b/drivers/leds/leds-ns2.c @@ -30,7 +30,7 @@ struct ns2_led_modval { int slow_level; }; -struct ns2_led { +struct ns2_led_of_one { const char *name; const char *default_trigger; struct gpio_desc *cmd; @@ -40,8 +40,8 @@ struct ns2_led { }; struct ns2_led_of { - int num_leds; - struct ns2_led *leds; + int num_leds; + struct ns2_led_of_one *leds; }; /* @@ -51,7 +51,7 @@ struct ns2_led_of { * for the command/slow GPIOs corresponds to a LED mode. */ -struct ns2_led_data { +struct ns2_led { struct led_classdev cdev; struct gpio_desc *cmd; struct gpio_desc *slow; @@ -62,7 +62,7 @@ struct ns2_led_data { struct ns2_led_modval *modval; }; -static int ns2_led_get_mode(struct ns2_led_data *led_dat, +static int ns2_led_get_mode(struct ns2_led *led_dat, enum ns2_led_modes *mode) { int i; @@ -85,7 +85,7 @@ static int ns2_led_get_mode(struct ns2_led_data *led_dat, return ret; } -static void ns2_led_set_mode(struct ns2_led_data *led_dat, +static void ns2_led_set_mode(struct ns2_led *led_dat, enum ns2_led_modes mode) { int i; @@ -121,8 +121,8 @@ static void ns2_led_set_mode(struct ns2_led_data *led_dat, static void ns2_led_set(struct led_classdev *led_cdev, enum led_brightness value) { - struct ns2_led_data *led_dat = - container_of(led_cdev, struct ns2_led_data, cdev); + struct ns2_led *led_dat = + container_of(led_cdev, struct ns2_led, cdev); enum ns2_led_modes mode; if (value == LED_OFF) @@ -147,8 +147,8 @@ static ssize_t ns2_led_sata_store(struct device *dev, const char *buff, size_t count) { struct led_classdev *led_cdev = dev_get_drvdata(dev); - struct ns2_led_data *led_dat = - container_of(led_cdev, struct ns2_led_data, cdev); + struct ns2_led *led_dat = + container_of(led_cdev, struct ns2_led, cdev); int ret; unsigned long enable; @@ -179,8 +179,8 @@ static ssize_t ns2_led_sata_show(struct device *dev, struct device_attribute *attr, char *buf) { struct led_classdev *led_cdev = dev_get_drvdata(dev); - struct ns2_led_data *led_dat = - container_of(led_cdev, struct ns2_led_data, cdev); + struct ns2_led *led_dat = + container_of(led_cdev, struct ns2_led, cdev); return sprintf(buf, "%d\n", led_dat->sata); } @@ -194,8 +194,8 @@ static struct attribute *ns2_led_attrs[] = { ATTRIBUTE_GROUPS(ns2_led); static int -create_ns2_led(struct platform_device *pdev, struct ns2_led_data *led_dat, - const struct ns2_led *template) +create_ns2_led(struct platform_device *pdev, struct ns2_led *led_dat, + const struct ns2_led_of_one *template) { int ret; enum ns2_led_modes mode; @@ -231,7 +231,7 @@ create_ns2_led(struct platform_device *pdev, struct ns2_led_data *led_dat, } static int ns2_leds_parse_one(struct device *dev, struct device_node *np, - struct ns2_led *led) + struct ns2_led_of_one *led) { struct ns2_led_modval *modval; int nmodes, ret, i; @@ -289,7 +289,7 @@ ns2_leds_parse_of(struct device *dev, struct ns2_led_of *ofdata) { struct device_node *np = dev_of_node(dev); struct device_node *child; - struct ns2_led *led, *leds; + struct ns2_led_of_one *led, *leds; int ret, num_leds = 0; num_leds = of_get_available_child_count(np); @@ -325,7 +325,7 @@ MODULE_DEVICE_TABLE(of, of_ns2_leds_match); static int ns2_led_probe(struct platform_device *pdev) { struct ns2_led_of *ofdata; - struct ns2_led_data *leds; + struct ns2_led *leds; int i; int ret; -- 2.26.2