From patchwork Wed Oct 2 12:40:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 174996 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp707407ill; Wed, 2 Oct 2019 05:42:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqwZuM1Nu8ccZwl+GA/tf8ZGZ2Mhxx54HRHLWRWQZ7TfLUFxXaHzDXw+pUTKPEMO0iOHapwC X-Received: by 2002:a17:906:839a:: with SMTP id p26mr2803817ejx.94.1570020028461; Wed, 02 Oct 2019 05:40:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570020028; cv=none; d=google.com; s=arc-20160816; b=VVIYGyGQQvWV8bsIznhTiZO/pRR9LLsWxe6Je5mUhqZvqKCY+M7h5/vdscc2/6TrPG g/pWFwZR79lznaGilG7rxsg+ohId2vMHI3Emua+FlOK46SsL0sgppTHkm5kmmpG2Dz38 KlilG0Pz4EIhPUEbes7QDlLlC9jvxdZhL4oKAMLXBx8+sIVrZ0Np+X7s2l/eIYlXUT4K zGBcq3l9swHEcryr+HtAs03wvxSMC6YN05K0ma6UK7mPPZvU6umetQ+J+XUZyCf+1Hrf FdVIbUwEcaA8pPDEd0eWTLpf4qdS4CuMLgkxpzQ2tuoUrzm0c865qxlzUclAQD/J10ge b1QA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=GGDOyQL+13uGomQIzn17lPQZjfrmmobRzDF35QsnYtE=; b=qSGQOVYQ2vDdQIKj5mbKMgfhjUUU/E0uFif4aiFtA3m/UGC9IXeDye0+iwerZW3w/o ODxpBXFaCkg3qpogAhjWkwI8bkAuic/zD3HDVztlS3FWBJTpiccpdShIYQjQp4I8Za26 rBnkpc92lIagSoAlisXYN1oalSpYQcpgtC64WT+jesJIPnyi6Lumk7NYzVpePy3hOoX7 ghMRHSMTtAwavulEpiLC4WPyfoYqfVXudxVueuxwca/HDRLMMRsEI+lWCkYi8FJEdzHL 13jZVUm3wAquUr+nLG9zLPT+y0EwSjg7pVw/xw9X1vrri0YNoHgX9d0HYenIQaKn3XY3 gztg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=zPiMketr; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u18si10483893ejk.105.2019.10.02.05.40.28; Wed, 02 Oct 2019 05:40:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=zPiMketr; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727499AbfJBMkX (ORCPT + 27 others); Wed, 2 Oct 2019 08:40:23 -0400 Received: from lelv0142.ext.ti.com ([198.47.23.249]:54008 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725747AbfJBMkI (ORCPT ); Wed, 2 Oct 2019 08:40:08 -0400 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id x92Ce43E014737; Wed, 2 Oct 2019 07:40:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1570020004; bh=GGDOyQL+13uGomQIzn17lPQZjfrmmobRzDF35QsnYtE=; h=From:To:CC:Subject:Date; b=zPiMketrYRsyTn91wIRfRfVw1RXCFpSapJbumE7qE0Fn08Id7HLjO6RSOa2LQn3au eTjzCCjjdav4+d8awZJTmXL//OtdZqh+hYTDCyWHa8utXcTG/IjsccF1BwSwSvssUj e7T3fgS5E50VgyJV/V+iRPbCV98h24nkD4qpMzME= Received: from DFLE108.ent.ti.com (dfle108.ent.ti.com [10.64.6.29]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x92Ce3hK009143 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 2 Oct 2019 07:40:04 -0500 Received: from DFLE110.ent.ti.com (10.64.6.31) by DFLE108.ent.ti.com (10.64.6.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Wed, 2 Oct 2019 07:39:53 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DFLE110.ent.ti.com (10.64.6.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Wed, 2 Oct 2019 07:40:03 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id x92Ce3rm055816; Wed, 2 Oct 2019 07:40:03 -0500 From: Dan Murphy To: , CC: , , Dan Murphy Subject: [PATCH v2 1/6] leds: flash: Remove extern from the header file Date: Wed, 2 Oct 2019 07:40:37 -0500 Message-ID: <20191002124042.25593-1-dmurphy@ti.com> X-Mailer: git-send-email 2.22.0.214.g8dca754b1e MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org extern is implied and is not needed in the header file. Remove the extern keyword and re-align the code. Signed-off-by: Dan Murphy --- include/linux/led-class-flash.h | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) -- 2.22.0.214.g8dca754b1e diff --git a/include/linux/led-class-flash.h b/include/linux/led-class-flash.h index 7ff287a9e2a2..1bd83159fa4c 100644 --- a/include/linux/led-class-flash.h +++ b/include/linux/led-class-flash.h @@ -94,12 +94,12 @@ static inline struct led_classdev_flash *lcdev_to_flcdev( * * Returns: 0 on success or negative error value on failure */ -extern int led_classdev_flash_register_ext(struct device *parent, - struct led_classdev_flash *fled_cdev, - struct led_init_data *init_data); +int led_classdev_flash_register_ext(struct device *parent, + struct led_classdev_flash *fled_cdev, + struct led_init_data *init_data); static inline int led_classdev_flash_register(struct device *parent, - struct led_classdev_flash *fled_cdev) + struct led_classdev_flash *fled_cdev) { return led_classdev_flash_register_ext(parent, fled_cdev, NULL); } @@ -111,7 +111,7 @@ static inline int led_classdev_flash_register(struct device *parent, * * Unregister a previously registered via led_classdev_flash_register object */ -extern void led_classdev_flash_unregister(struct led_classdev_flash *fled_cdev); +void led_classdev_flash_unregister(struct led_classdev_flash *fled_cdev); /** * led_set_flash_strobe - setup flash strobe @@ -159,8 +159,8 @@ static inline int led_get_flash_strobe(struct led_classdev_flash *fled_cdev, * * Returns: 0 on success or negative error value on failure */ -extern int led_set_flash_brightness(struct led_classdev_flash *fled_cdev, - u32 brightness); +int led_set_flash_brightness(struct led_classdev_flash *fled_cdev, + u32 brightness); /** * led_update_flash_brightness - update flash LED brightness @@ -171,7 +171,7 @@ extern int led_set_flash_brightness(struct led_classdev_flash *fled_cdev, * * Returns: 0 on success or negative error value on failure */ -extern int led_update_flash_brightness(struct led_classdev_flash *fled_cdev); +int led_update_flash_brightness(struct led_classdev_flash *fled_cdev); /** * led_set_flash_timeout - set flash LED timeout @@ -182,8 +182,7 @@ extern int led_update_flash_brightness(struct led_classdev_flash *fled_cdev); * * Returns: 0 on success or negative error value on failure */ -extern int led_set_flash_timeout(struct led_classdev_flash *fled_cdev, - u32 timeout); +int led_set_flash_timeout(struct led_classdev_flash *fled_cdev, u32 timeout); /** * led_get_flash_fault - get the flash LED fault @@ -194,7 +193,6 @@ extern int led_set_flash_timeout(struct led_classdev_flash *fled_cdev, * * Returns: 0 on success or negative error value on failure */ -extern int led_get_flash_fault(struct led_classdev_flash *fled_cdev, - u32 *fault); +int led_get_flash_fault(struct led_classdev_flash *fled_cdev, u32 *fault); #endif /* __LINUX_FLASH_LEDS_H_INCLUDED */ From patchwork Wed Oct 2 12:40:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 174993 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp704896ill; Wed, 2 Oct 2019 05:40:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqwa1sJSSMfdJwYKY3w+DGmJuvYhMGKzjOKI+zYvvBWcvjU8BHCV6g97Ri5CBHUrrYqji9uw X-Received: by 2002:a17:906:938b:: with SMTP id l11mr2843640ejx.67.1570020021925; Wed, 02 Oct 2019 05:40:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570020021; cv=none; d=google.com; s=arc-20160816; b=tpahXfl2X3Z6U7CnzntmDy17HfF7SLOFHclDJgg2mhzThwUwoVCGGKlmc5WiuG6RU1 hXegef0mXfpywsCL8UCPwA6nXO+bsEKW6OeN2tud53XpNwytUfELPXXuTQwZPrqvjabp OBwiF2f2wUK7QLz9UjugOhjg/VPYDSiomZMRJhZclhzXDbnw+dNvN/MuHDi9ov7cnH2x 9I00/PH0JTWOssoGBwEbAqHSMg5n5EEnUFY4BX0NJaEf1/OlZNLSvb7r2QIr2yvkF255 jGSXlUZL7395c6dO+69a8w35xa0sYpq0TFXrGQawHqJLy2NAjvydbIUwFyu6jC0UC1xD B7DA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=V5i2WFcuhfe5u3LBdg2gXDOnWB+ykjunjzamA4BciLw=; b=yQ69e268WjlyrTv4Oq1XBuoWIhF4LwR+T5IW9MJB2esVfnWc+OTBd+iqED6NajBPN1 avuFegww4jYfVHYKkcbRpwZHMIXr5eOzr+/jlbEJ0VmJmisfjy1vqcL6GeQ2bP9eT+wP 8bYOlYWGg7jZ1s20hq6ODtdeSzQVpVFLP8L0VNOSQeOiUnh38SJ0PV6IjtT1ToRiWmK6 XRAH5eeJlk5t5epqvlI6lacdL0I5TxWBq7HWxE22Gc05sXnWkrMI7y3PfH05HXrIgKex w40zY2nYbkKWtCzpOmnC80UCbbCYsM409K31t42QwRNt3xyUbRYQ2FVf9k3HZ6AqS9TP prjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=ADbsjyBT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k7si10392513eja.377.2019.10.02.05.40.21; Wed, 02 Oct 2019 05:40:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=ADbsjyBT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727330AbfJBMkJ (ORCPT + 27 others); Wed, 2 Oct 2019 08:40:09 -0400 Received: from fllv0016.ext.ti.com ([198.47.19.142]:35524 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726325AbfJBMkH (ORCPT ); Wed, 2 Oct 2019 08:40:07 -0400 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id x92Ce4aO077277; Wed, 2 Oct 2019 07:40:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1570020004; bh=V5i2WFcuhfe5u3LBdg2gXDOnWB+ykjunjzamA4BciLw=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=ADbsjyBTQUaxS/nzDvILG3lryMg4fpiDTj8PsjRlU5htCc6gQj8in9ht3QB9wt4ow q5LXlM4ERHlgcHbbbK/Nmplc5WZf1wOdkNPkDWZxXgGRfMlVTIVKSjvvPgaQa8tZU5 JXDizV1HfVjto15hIcecp9WToeavkwTmY19Yj7hc= Received: from DFLE108.ent.ti.com (dfle108.ent.ti.com [10.64.6.29]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x92Ce4dH009167 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 2 Oct 2019 07:40:04 -0500 Received: from DFLE104.ent.ti.com (10.64.6.25) by DFLE108.ent.ti.com (10.64.6.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Wed, 2 Oct 2019 07:39:53 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE104.ent.ti.com (10.64.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Wed, 2 Oct 2019 07:40:03 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id x92Ce3mf094920; Wed, 2 Oct 2019 07:40:03 -0500 From: Dan Murphy To: , CC: , , Dan Murphy Subject: [PATCH v2 2/6] leds: flash: Add devm_* functions to the flash class Date: Wed, 2 Oct 2019 07:40:38 -0500 Message-ID: <20191002124042.25593-2-dmurphy@ti.com> X-Mailer: git-send-email 2.22.0.214.g8dca754b1e In-Reply-To: <20191002124042.25593-1-dmurphy@ti.com> References: <20191002124042.25593-1-dmurphy@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add the missing device managed API for registration and unregistration for the LED flash class. Signed-off-by: Dan Murphy --- drivers/leds/led-class-flash.c | 50 +++++++++++++++++++++++++++++++++ include/linux/led-class-flash.h | 14 +++++++++ 2 files changed, 64 insertions(+) -- 2.22.0.214.g8dca754b1e diff --git a/drivers/leds/led-class-flash.c b/drivers/leds/led-class-flash.c index 60c3de5c6b9f..6eeb9effcf65 100644 --- a/drivers/leds/led-class-flash.c +++ b/drivers/leds/led-class-flash.c @@ -327,6 +327,56 @@ void led_classdev_flash_unregister(struct led_classdev_flash *fled_cdev) } EXPORT_SYMBOL_GPL(led_classdev_flash_unregister); +static void devm_led_classdev_flash_release(struct device *dev, void *res) +{ + led_classdev_flash_unregister(*(struct led_classdev_flash **)res); +} + +int devm_led_classdev_flash_register_ext(struct device *parent, + struct led_classdev_flash *fled_cdev, + struct led_init_data *init_data) +{ + struct led_classdev_flash **dr; + int ret; + + dr = devres_alloc(devm_led_classdev_flash_release, sizeof(*dr), + GFP_KERNEL); + if (!dr) + return -ENOMEM; + + ret = led_classdev_flash_register_ext(parent, fled_cdev, init_data); + if (ret) { + devres_free(dr); + return ret; + } + + *dr = fled_cdev; + devres_add(parent, dr); + + return 0; +} +EXPORT_SYMBOL_GPL(devm_led_classdev_flash_register_ext); + +static int devm_led_classdev_flash_match(struct device *dev, + void *res, void *data) +{ + struct led_classdev_flash **p = res; + + if (WARN_ON(!p || !*p)) + return 0; + + return *p == data; +} + +void devm_led_classdev_flash_unregister(struct device *dev, + struct led_classdev_flash *fled_cdev) +{ + WARN_ON(devres_release(dev, + devm_led_classdev_flash_release, + devm_led_classdev_flash_match, fled_cdev)); +} +EXPORT_SYMBOL_GPL(devm_led_classdev_flash_unregister); + static void led_clamp_align(struct led_flash_setting *s) { u32 v, offset; diff --git a/include/linux/led-class-flash.h b/include/linux/led-class-flash.h index 1bd83159fa4c..21a3358a1731 100644 --- a/include/linux/led-class-flash.h +++ b/include/linux/led-class-flash.h @@ -113,6 +113,20 @@ static inline int led_classdev_flash_register(struct device *parent, */ void led_classdev_flash_unregister(struct led_classdev_flash *fled_cdev); +int devm_led_classdev_flash_register_ext(struct device *parent, + struct led_classdev_flash *fled_cdev, + struct led_init_data *init_data); + + +static inline int devm_led_classdev_flash_register(struct device *parent, + struct led_classdev_flash *fled_cdev) +{ + return devm_led_classdev_flash_register_ext(parent, fled_cdev, NULL); +} + +void devm_led_classdev_flash_unregister(struct device *parent, + struct led_classdev_flash *fled_cdev); + /** * led_set_flash_strobe - setup flash strobe * @fled_cdev: the flash LED to set strobe on From patchwork Wed Oct 2 12:40:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 174992 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp704890ill; Wed, 2 Oct 2019 05:40:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqwtfbB3QaDYntjtSYVrVT7/Dje2IjOduor7l6mULjbp9J41ndxezzeFWu5Y4qfSbXwd5+MG X-Received: by 2002:aa7:dcd7:: with SMTP id w23mr3466597edu.170.1570020021280; Wed, 02 Oct 2019 05:40:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570020021; cv=none; d=google.com; s=arc-20160816; b=Ey1CXKjFbX5J8z5i46u+cHBG7c5BCJX421do4j91XlkvGjU/NFeG1k2Uc/OAm7GCly rVdDfZM0FVP/5qDauIX/3po9kqghaMXuaM0k/Y4aIrZVe4wRARXp5InpvZUZkz2aN4vU f2lrI2VyXlF32IiPEo98bl7YBZ733Mi9eaVfIpydVJCgbfy+GdyE9Wha/MLSana/vY1w v6efWEFQmKG5UJmTh/84GZVbgw6WIHudJLYBy4DJT9VbR28ZiER51L8oo9moozyehpkl RZbJ1zGJlk8tJhGxQhWc3N2UV4PaCIl85Jyl5Yba2ADO1BTDC+3NP6PlfvuOgkbXAsVs Gc3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=v06VAXtceMbBhHOflWlvtx0T0QpenZBc43NJCGqs8UQ=; b=oJoECFgnsUspt9P59G5zW1hDjh5qJH9cTAaTATJHFc5mMeEIDi/axk5aGVmUNdwOM/ qRLVEjnGe3rTuYgguM41g3VNkm/54N61rZBhD987R9iyttj9N/10dHUoTZOz2uMgWjZC I9NQ4vE+pcU4NsIZF69liNjH2nOT4qdpWCgCuMaoRkNptgeMGEz43+ScIdIgK/Jl1E4B 5tnEkE/zFdkX+paYlwj61WxnWRzC3SHnjUJrl/bNT3KgXAhGiRlPy6FKCSRgo3kPEc8J My7mhk551VSdLMzPsSZGIAsDMLoxMn7BFF0dnT8Je1X6uQsAgYkpFgg6fsKxcX2wRAu7 Z/pA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=d5TXeWP8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k7si10392513eja.377.2019.10.02.05.40.20; Wed, 02 Oct 2019 05:40:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=d5TXeWP8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727381AbfJBMkK (ORCPT + 27 others); Wed, 2 Oct 2019 08:40:10 -0400 Received: from lelv0143.ext.ti.com ([198.47.23.248]:39174 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727184AbfJBMkH (ORCPT ); Wed, 2 Oct 2019 08:40:07 -0400 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id x92Ce4xp090633; Wed, 2 Oct 2019 07:40:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1570020004; bh=v06VAXtceMbBhHOflWlvtx0T0QpenZBc43NJCGqs8UQ=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=d5TXeWP8fS0Kx4u7iNKS4ngn+E7eAoZIPHXUJtFnCuFKcOliKirJL3rw85/MmsYKt RKroVH6hUyEPoYpDx63BYeGW4xUi6Zd0shhbZ1qNaJTrdA9zgIJcFNNtz+zzjeO8DF sZtCH+6/3ze/UhKyPaoeNZdxpZE1le9b+b0EqwOk= Received: from DFLE108.ent.ti.com (dfle108.ent.ti.com [10.64.6.29]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x92Ce4nq117265 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 2 Oct 2019 07:40:04 -0500 Received: from DFLE106.ent.ti.com (10.64.6.27) by DFLE108.ent.ti.com (10.64.6.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Wed, 2 Oct 2019 07:39:53 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DFLE106.ent.ti.com (10.64.6.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Wed, 2 Oct 2019 07:40:04 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id x92Ce4Ye002032; Wed, 2 Oct 2019 07:40:04 -0500 From: Dan Murphy To: , CC: , , Dan Murphy Subject: [PATCH v2 3/6] leds: lm3601x: Convert class registration to device managed Date: Wed, 2 Oct 2019 07:40:39 -0500 Message-ID: <20191002124042.25593-3-dmurphy@ti.com> X-Mailer: git-send-email 2.22.0.214.g8dca754b1e In-Reply-To: <20191002124042.25593-1-dmurphy@ti.com> References: <20191002124042.25593-1-dmurphy@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Convert LED flash class registration to device managed class registration API. Signed-off-by: Dan Murphy --- drivers/leds/leds-lm3601x.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) -- 2.22.0.214.g8dca754b1e diff --git a/drivers/leds/leds-lm3601x.c b/drivers/leds/leds-lm3601x.c index b02972f1a341..fce89f2a2d92 100644 --- a/drivers/leds/leds-lm3601x.c +++ b/drivers/leds/leds-lm3601x.c @@ -350,8 +350,7 @@ static int lm3601x_register_leds(struct lm3601x_led *led, init_data.devicename = led->client->name; init_data.default_label = (led->led_mode == LM3601X_LED_TORCH) ? "torch" : "infrared"; - - return led_classdev_flash_register_ext(&led->client->dev, + return devm_led_classdev_flash_register_ext(&led->client->dev, &led->fled_cdev, &init_data); } @@ -445,7 +444,6 @@ static int lm3601x_remove(struct i2c_client *client) { struct lm3601x_led *led = i2c_get_clientdata(client); - led_classdev_flash_unregister(&led->fled_cdev); mutex_destroy(&led->lock); return regmap_update_bits(led->regmap, LM3601X_ENABLE_REG, From patchwork Wed Oct 2 12:40:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 174994 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp705008ill; Wed, 2 Oct 2019 05:40:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqwiZnIbOO+6FIoXd4LIHM87CPigqjmBTAIgA+VTYbJCbDorM/1WcMlHvX/m6erYz25d1kLk X-Received: by 2002:a17:906:198f:: with SMTP id g15mr2734451ejd.76.1570020027980; Wed, 02 Oct 2019 05:40:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570020027; cv=none; d=google.com; s=arc-20160816; b=MwOQwMqKgy87xJelqED98/pLA28JL0uwunWv9+Zt3TvKx4GWSjEFcNwUjC7Q/0E0aj jVdoWOlzFi5f/TLv/XLBRhDZTiMBtKwFbYSSLO9EXYS99G4yhWu5CF9PlkXUDn7v3iYh csjKv79e+X7rnNvf2KyQMZm0BvoPFmMiEBRjDSq/x0mPSFbvRjsy9W/RmrXJ/XqDD7JO BWTahve+78/BFfRCJI/ywIASKa1i5+vKaWqjU6vIz6fyfSG0PxQx2Ei2B1Swau0fsHgi 2vt1Ceqk5K998STbXCmvgkJOg/wx+1l9Bh2kdutEn04/1gK7I/YvZt+aJAI2yDuWDw4o BPIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=LTptu4xsK2SSC6pHmnlTsv5lsaOlzGsykAE7HDElzj8=; b=HJ1/Kqw+SpySJ2sVSLx19e4QOpChq+7hkpDwB3O0qx8+aF188yimftw0AJpOZB2FAH TOIYInvPbKyLZNYOL7ddndKkSJZ1JNcu5DXmTInsLSXHVgNdJfb0DrKeqpneFlFu62ce zb6+NbKdeFwWKNox1M6xWOIElG8tlkR0L6RQujf3t/swllWOaJ224T+4er2nCbgwzrYL ZVJz1/qv7zGPvFgN5UybDKbGCOPxF+6w5HcpRtN7dcBzmNCSbwG7hyXjCz85ZH4tR4oc UC5o0hzwZ+PyJkrUyaRI3nM1/LH24n4CRU2zv7sRSNM5i7r8+DwepkuS9+3EUtSWGaek 48wg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=trdaIvHD; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u18si10483893ejk.105.2019.10.02.05.40.27; Wed, 02 Oct 2019 05:40:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=trdaIvHD; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727530AbfJBMkY (ORCPT + 27 others); Wed, 2 Oct 2019 08:40:24 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:59774 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727191AbfJBMkI (ORCPT ); Wed, 2 Oct 2019 08:40:08 -0400 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id x92Ce4iQ099751; Wed, 2 Oct 2019 07:40:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1570020005; bh=LTptu4xsK2SSC6pHmnlTsv5lsaOlzGsykAE7HDElzj8=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=trdaIvHDEc71SXi1tiXM/knMFHqBRDLGSYkXFoRzIhMSskmieo/K/qttZ03RU7nx6 TB5NoRTxemMk5Pna/uGcry0O9LpdG4VImovbPbrH1i4Av0H8gtoZq6Qh50Pk0VmZcW WPr88fpBdYyQYrauMSOVTyKl9KNsjiw9kGZoR/EY= Received: from DLEE108.ent.ti.com (dlee108.ent.ti.com [157.170.170.38]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x92Ce4vN009203 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 2 Oct 2019 07:40:04 -0500 Received: from DLEE102.ent.ti.com (157.170.170.32) by DLEE108.ent.ti.com (157.170.170.38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Wed, 2 Oct 2019 07:39:53 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DLEE102.ent.ti.com (157.170.170.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Wed, 2 Oct 2019 07:39:53 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id x92Ce4ji094957; Wed, 2 Oct 2019 07:40:04 -0500 From: Dan Murphy To: , CC: , , Dan Murphy Subject: [PATCH v2 4/6] leds: core: Remove extern from header Date: Wed, 2 Oct 2019 07:40:40 -0500 Message-ID: <20191002124042.25593-4-dmurphy@ti.com> X-Mailer: git-send-email 2.22.0.214.g8dca754b1e In-Reply-To: <20191002124042.25593-1-dmurphy@ti.com> References: <20191002124042.25593-1-dmurphy@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org extern is implied and is not needed in the header file. Remove the extern keyword and re-align the code. Signed-off-by: Dan Murphy --- include/linux/leds.h | 95 ++++++++++++++++++++------------------------ 1 file changed, 44 insertions(+), 51 deletions(-) -- 2.22.0.214.g8dca754b1e diff --git a/include/linux/leds.h b/include/linux/leds.h index 0b6b6166e9ea..52e50183b963 100644 --- a/include/linux/leds.h +++ b/include/linux/leds.h @@ -161,7 +161,7 @@ struct led_classdev { * * Returns: 0 on success or negative error value on failure */ -extern int led_classdev_register_ext(struct device *parent, +int led_classdev_register_ext(struct device *parent, struct led_classdev *led_cdev, struct led_init_data *init_data); @@ -181,7 +181,7 @@ static inline int led_classdev_register(struct device *parent, return led_classdev_register_ext(parent, led_cdev, NULL); } -extern int devm_led_classdev_register_ext(struct device *parent, +int devm_led_classdev_register_ext(struct device *parent, struct led_classdev *led_cdev, struct led_init_data *init_data); @@ -190,11 +190,11 @@ static inline int devm_led_classdev_register(struct device *parent, { return devm_led_classdev_register_ext(parent, led_cdev, NULL); } -extern void led_classdev_unregister(struct led_classdev *led_cdev); -extern void devm_led_classdev_unregister(struct device *parent, - struct led_classdev *led_cdev); -extern void led_classdev_suspend(struct led_classdev *led_cdev); -extern void led_classdev_resume(struct led_classdev *led_cdev); +void led_classdev_unregister(struct led_classdev *led_cdev); +void devm_led_classdev_unregister(struct device *parent, + struct led_classdev *led_cdev); +void led_classdev_suspend(struct led_classdev *led_cdev); +void led_classdev_resume(struct led_classdev *led_cdev); /** * led_blink_set - set blinking with software fallback @@ -211,9 +211,8 @@ extern void led_classdev_resume(struct led_classdev *led_cdev); * led_cdev->brightness_set() will not stop the blinking, * use led_classdev_brightness_set() instead. */ -extern void led_blink_set(struct led_classdev *led_cdev, - unsigned long *delay_on, - unsigned long *delay_off); +void led_blink_set(struct led_classdev *led_cdev, unsigned long *delay_on, + unsigned long *delay_off); /** * led_blink_set_oneshot - do a oneshot software blink * @led_cdev: the LED to start blinking @@ -228,10 +227,9 @@ extern void led_blink_set(struct led_classdev *led_cdev, * If invert is set, led blinks for delay_off first, then for * delay_on and leave the led on after the on-off cycle. */ -extern void led_blink_set_oneshot(struct led_classdev *led_cdev, - unsigned long *delay_on, - unsigned long *delay_off, - int invert); +void led_blink_set_oneshot(struct led_classdev *led_cdev, + unsigned long *delay_on, unsigned long *delay_off, + int invert); /** * led_set_brightness - set LED brightness * @led_cdev: the LED to set @@ -241,8 +239,8 @@ extern void led_blink_set_oneshot(struct led_classdev *led_cdev, * software blink timer that implements blinking when the * hardware doesn't. This function is guaranteed not to sleep. */ -extern void led_set_brightness(struct led_classdev *led_cdev, - enum led_brightness brightness); +void led_set_brightness(struct led_classdev *led_cdev, + enum led_brightness brightness); /** * led_set_brightness_sync - set LED brightness synchronously @@ -255,8 +253,8 @@ extern void led_set_brightness(struct led_classdev *led_cdev, * * Returns: 0 on success or negative error value on failure */ -extern int led_set_brightness_sync(struct led_classdev *led_cdev, - enum led_brightness value); +int led_set_brightness_sync(struct led_classdev *led_cdev, + enum led_brightness value); /** * led_update_brightness - update LED brightness @@ -267,7 +265,7 @@ extern int led_set_brightness_sync(struct led_classdev *led_cdev, * * Returns: 0 on success or negative error value on failure */ -extern int led_update_brightness(struct led_classdev *led_cdev); +int led_update_brightness(struct led_classdev *led_cdev); /** * led_get_default_pattern - return default pattern @@ -279,8 +277,7 @@ extern int led_update_brightness(struct led_classdev *led_cdev); * Return: Allocated array of integers with default pattern from device tree * or NULL. Caller is responsible for kfree(). */ -extern u32 *led_get_default_pattern(struct led_classdev *led_cdev, - unsigned int *size); +u32 *led_get_default_pattern(struct led_classdev *led_cdev, unsigned int *size); /** * led_sysfs_disable - disable LED sysfs interface @@ -288,7 +285,7 @@ extern u32 *led_get_default_pattern(struct led_classdev *led_cdev, * * Disable the led_cdev's sysfs interface. */ -extern void led_sysfs_disable(struct led_classdev *led_cdev); +void led_sysfs_disable(struct led_classdev *led_cdev); /** * led_sysfs_enable - enable LED sysfs interface @@ -296,7 +293,7 @@ extern void led_sysfs_disable(struct led_classdev *led_cdev); * * Enable the led_cdev's sysfs interface. */ -extern void led_sysfs_enable(struct led_classdev *led_cdev); +void led_sysfs_enable(struct led_classdev *led_cdev); /** * led_compose_name - compose LED class device name @@ -311,8 +308,8 @@ extern void led_sysfs_enable(struct led_classdev *led_cdev); * * Returns: 0 on success or negative error value on failure */ -extern int led_compose_name(struct device *dev, struct led_init_data *init_data, - char *led_classdev_name); +int led_compose_name(struct device *dev, struct led_init_data *init_data, + char *led_classdev_name); /** * led_sysfs_is_disabled - check if LED sysfs interface is disabled @@ -362,27 +359,24 @@ struct led_trigger { #define led_trigger_get_drvdata(dev) (led_get_trigger_data(led_trigger_get_led(dev))) /* Registration functions for complex triggers */ -extern int led_trigger_register(struct led_trigger *trigger); -extern void led_trigger_unregister(struct led_trigger *trigger); -extern int devm_led_trigger_register(struct device *dev, +int led_trigger_register(struct led_trigger *trigger); +void led_trigger_unregister(struct led_trigger *trigger); +int devm_led_trigger_register(struct device *dev, struct led_trigger *trigger); -extern void led_trigger_register_simple(const char *name, +void led_trigger_register_simple(const char *name, struct led_trigger **trigger); -extern void led_trigger_unregister_simple(struct led_trigger *trigger); -extern void led_trigger_event(struct led_trigger *trigger, - enum led_brightness event); -extern void led_trigger_blink(struct led_trigger *trigger, - unsigned long *delay_on, - unsigned long *delay_off); -extern void led_trigger_blink_oneshot(struct led_trigger *trigger, - unsigned long *delay_on, - unsigned long *delay_off, - int invert); -extern void led_trigger_set_default(struct led_classdev *led_cdev); -extern int led_trigger_set(struct led_classdev *led_cdev, - struct led_trigger *trigger); -extern void led_trigger_remove(struct led_classdev *led_cdev); +void led_trigger_unregister_simple(struct led_trigger *trigger); +void led_trigger_event(struct led_trigger *trigger, enum led_brightness event); +void led_trigger_blink(struct led_trigger *trigger, unsigned long *delay_on, + unsigned long *delay_off); +void led_trigger_blink_oneshot(struct led_trigger *trigger, + unsigned long *delay_on, + unsigned long *delay_off, + int invert); +void led_trigger_set_default(struct led_classdev *led_cdev); +int led_trigger_set(struct led_classdev *led_cdev, struct led_trigger *trigger); +void led_trigger_remove(struct led_classdev *led_cdev); static inline void led_set_trigger_data(struct led_classdev *led_cdev, void *trigger_data) @@ -410,8 +404,7 @@ static inline void *led_get_trigger_data(struct led_classdev *led_cdev) * This is meant to be used on triggers with statically * allocated name. */ -extern void led_trigger_rename_static(const char *name, - struct led_trigger *trig); +void led_trigger_rename_static(const char *name, struct led_trigger *trig); #define module_led_trigger(__led_trigger) \ module_driver(__led_trigger, led_trigger_register, \ @@ -453,20 +446,20 @@ static inline void *led_get_trigger_data(struct led_classdev *led_cdev) /* Trigger specific functions */ #ifdef CONFIG_LEDS_TRIGGER_DISK -extern void ledtrig_disk_activity(bool write); +void ledtrig_disk_activity(bool write); #else static inline void ledtrig_disk_activity(bool write) {} #endif #ifdef CONFIG_LEDS_TRIGGER_MTD -extern void ledtrig_mtd_activity(void); +void ledtrig_mtd_activity(void); #else static inline void ledtrig_mtd_activity(void) {} #endif #if defined(CONFIG_LEDS_TRIGGER_CAMERA) || defined(CONFIG_LEDS_TRIGGER_CAMERA_MODULE) -extern void ledtrig_flash_ctrl(bool on); -extern void ledtrig_torch_ctrl(bool on); +void ledtrig_flash_ctrl(bool on); +void ledtrig_torch_ctrl(bool on); #else static inline void ledtrig_flash_ctrl(bool on) {} static inline void ledtrig_torch_ctrl(bool on) {} @@ -546,7 +539,7 @@ enum cpu_led_event { CPU_LED_HALTED, /* Machine shutdown */ }; #ifdef CONFIG_LEDS_TRIGGER_CPU -extern void ledtrig_cpu(enum cpu_led_event evt); +void ledtrig_cpu(enum cpu_led_event evt); #else static inline void ledtrig_cpu(enum cpu_led_event evt) { @@ -555,7 +548,7 @@ static inline void ledtrig_cpu(enum cpu_led_event evt) #endif #ifdef CONFIG_LEDS_BRIGHTNESS_HW_CHANGED -extern void led_classdev_notify_brightness_hw_changed( +void led_classdev_notify_brightness_hw_changed( struct led_classdev *led_cdev, enum led_brightness brightness); #else static inline void led_classdev_notify_brightness_hw_changed( From patchwork Wed Oct 2 12:40:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 174995 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp707057ill; Wed, 2 Oct 2019 05:42:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqx9Qu2IqZSYJn+3UuaKHlNr48FC8TWemMtsZK6cnm4nQNooQclFVMcV9jcoAUUmzbQ7IlgM X-Received: by 2002:a50:ef02:: with SMTP id m2mr3542902eds.157.1570020015835; Wed, 02 Oct 2019 05:40:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570020015; cv=none; d=google.com; s=arc-20160816; b=bATG1EkI/RJFO66FKdbxjSCoZw/43kFn7FXTHkRjY40/z67vpnPiYdKPrZooBWslyA Us6oIcaQi4sGEzlUhOGDE6RlthshqNRCgD+SfvfxuRbklFD3t2q1kP0f+YmFcpGyGnIY SagjIFYoyxGKxnJGxfpV07WAvUklls1wCs7pQngiQuvVIb2ZTvqpDsBf0eCMijeXR/ES GcYdPS+iuJeGqPgNMpymx9Zko9d1cae4y0BRSnIa4KxAYYe6d/C5400uQvnrgvOCoPqE vIT5nefHvvxGBEhH8qm/uOjxDi+AZwd27kxFtv5uh5Ku7Uu7jSM4iY9YdxaIR4+GncWu ASZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=dkmFEQUZc03Vkc8FS2ObjTj3FAgduHGfTpnaLbtgfac=; b=i01DixnbxFM447veqd7QFr36nAypet7IsIuImGHihjf8J2HIuaqJC0TFnjvmMQuYfi QphMj3anuyOX5M2alxqiL/H3ZGdVs9RDmLDEckwTeG6mtPMd2XsJhOxNjnpgkOROAiiB n6TEbJ8IOqkqg0TtbqvKHqWyr8TuQ0wsojWt9fucy70MfPwkm+dA8/9sowOFDr7wBuHN aGvUFzPjyNtTwFfD9PQ1ODX+0HUfXisn27i6uvZfN2zZJdPxmzsnsfoi6oVB4sc9iadw rKtgmYKRjNf+BeKovBil0ns5Odk1vT44OfKf6O62N9Qog6d+Mz3cdxISBeI1sgpeNWtO MX+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=xW2stUqf; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r5si10437748edo.14.2019.10.02.05.40.15; Wed, 02 Oct 2019 05:40:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=xW2stUqf; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727431AbfJBMkL (ORCPT + 27 others); Wed, 2 Oct 2019 08:40:11 -0400 Received: from lelv0142.ext.ti.com ([198.47.23.249]:54006 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727178AbfJBMkI (ORCPT ); Wed, 2 Oct 2019 08:40:08 -0400 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id x92Ce5ih014742; Wed, 2 Oct 2019 07:40:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1570020005; bh=dkmFEQUZc03Vkc8FS2ObjTj3FAgduHGfTpnaLbtgfac=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=xW2stUqfGpSlD32dyqxV/tt3Aj8CrWcRCBMW7urDeNJFIOPVXF+ECtodvccrzV7L2 4eOcDKMJoBkLuB3zx9d3z1EpfIe4Gccgpyn/4ejpjbgCw1wBEAKFjRp78r92Vr2g9F KMBGxoPh+YD0eN3nE1sgerHnlQglib/UA6MMKIPs= Received: from DFLE108.ent.ti.com (dfle108.ent.ti.com [10.64.6.29]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x92Ce40P117296 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 2 Oct 2019 07:40:04 -0500 Received: from DFLE103.ent.ti.com (10.64.6.24) by DFLE108.ent.ti.com (10.64.6.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Wed, 2 Oct 2019 07:39:54 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DFLE103.ent.ti.com (10.64.6.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Wed, 2 Oct 2019 07:40:04 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id x92Ce48C002060; Wed, 2 Oct 2019 07:40:04 -0500 From: Dan Murphy To: , CC: , , Dan Murphy Subject: [PATCH v2 5/6] leds: core: Fix devm_classdev_match to reference correct structure Date: Wed, 2 Oct 2019 07:40:41 -0500 Message-ID: <20191002124042.25593-5-dmurphy@ti.com> X-Mailer: git-send-email 2.22.0.214.g8dca754b1e In-Reply-To: <20191002124042.25593-1-dmurphy@ti.com> References: <20191002124042.25593-1-dmurphy@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix the devm_classdev_match pointer initilization to the correct structure type. Signed-off-by: Dan Murphy --- drivers/leds/led-class.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.22.0.214.g8dca754b1e diff --git a/drivers/leds/led-class.c b/drivers/leds/led-class.c index 3f04334d59ee..438774315e6c 100644 --- a/drivers/leds/led-class.c +++ b/drivers/leds/led-class.c @@ -403,7 +403,7 @@ EXPORT_SYMBOL_GPL(devm_led_classdev_register_ext); static int devm_led_classdev_match(struct device *dev, void *res, void *data) { - struct led_cdev **p = res; + struct led_classdev **p = res; if (WARN_ON(!p || !*p)) return 0; From patchwork Wed Oct 2 12:40:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 174991 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp704740ill; Wed, 2 Oct 2019 05:40:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqzKt77HO+akmHy7L8d5xWLBUlrVtn0VIlNYgMOyI6JS+bg63oT7ACXaORDu2FY87n+VJJXA X-Received: by 2002:a17:906:af57:: with SMTP id ly23mr2780976ejb.269.1570020013538; Wed, 02 Oct 2019 05:40:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570020013; cv=none; d=google.com; s=arc-20160816; b=zhJ2JaJzPYPjS5DrIXaIsQ4tmsH5fz2QMkN4PdhN/yA7vTmrjC4+JvSFGo7K4iKRWb Ep3Srm3vwmuwJBT2rUbKs9SXFkfxEDbkGU97ivtaq9rSceGBr/ZmP6aCxW//0JOV9sHe 4zNgrxkIitXIhTgewi7zoqKkbwQBlpLhHhzkXeCHztBLj7T1T9TyteTx4tfOn1MTtCHz X8ADWE63JHJRm5n5ricEvP42gqL6daPj4yVD2um2+EWKaN0ePi6ICd8LN1f5Eue0lzVe CloBPyy98G9lV+aqAeJhIoFyAiLel58H1DA8kCMwN1n99U397wqu3AW1i2UYK9QHrnKx R1dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=SeaeW4nYhSYJliZDSdI8+/VmnyNhDewoNXbFcQ4DWWg=; b=OF4yOAklJxP9BaS2uZwSd6KI2L+XWLq4o9tLwHje+E188trjXhR7OIRWMSVAmNawK9 alY/3UAwmCp1SLCFosdHx7cKEM+zc0lLVpilVBE7/iqO9/cpi2P8gfpNamTq9R1ZIt9y 0yECDGJw0v+gTUFgYSiE0kddi9F2FkWTXjsZbey74CqmhyjkEp5nfiLP8S4ZrLdv8vW2 PyM/Z4liv0SQA7F+hTwadSXvy6ubafohZtQcROYwUrrFMa1aFmFDXEBlIyNZaF7+s217 Ep9p6y89lnBNdtGcil0sqz7K+zdcQ7hxuC99dLJbekQVp8lU/hjEfcSwyh4cr4ZSg/s9 Toww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=jlj5dVfp; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r5si10437748edo.14.2019.10.02.05.40.13; Wed, 02 Oct 2019 05:40:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=jlj5dVfp; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727469AbfJBMkM (ORCPT + 27 others); Wed, 2 Oct 2019 08:40:12 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:59772 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727194AbfJBMkI (ORCPT ); Wed, 2 Oct 2019 08:40:08 -0400 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id x92Ce5xC099755; Wed, 2 Oct 2019 07:40:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1570020005; bh=SeaeW4nYhSYJliZDSdI8+/VmnyNhDewoNXbFcQ4DWWg=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=jlj5dVfplmkRzmPrK1z2fmDyrQA86BGCgH37kjCp5TpvQ3hOz5J3DhpU7/Gn3nZ7S bcBy7JGZwXStBCUuqAlQZGltreUS4EwZ776sLkafkZ9CP+cuHU4bggx108ct99jmrZ Vdu7anQnNyB+ErJ6W1NbfKhP0mek/ZUeBeuzOj6w= Received: from DLEE108.ent.ti.com (dlee108.ent.ti.com [157.170.170.38]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x92Ce59N025037 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 2 Oct 2019 07:40:05 -0500 Received: from DLEE102.ent.ti.com (157.170.170.32) by DLEE108.ent.ti.com (157.170.170.38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Wed, 2 Oct 2019 07:39:54 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DLEE102.ent.ti.com (157.170.170.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Wed, 2 Oct 2019 07:39:54 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id x92Ce45Y055877; Wed, 2 Oct 2019 07:40:04 -0500 From: Dan Murphy To: , CC: , , Dan Murphy Subject: [PATCH v2 6/6] leds: core: Fix leds.h structure documentation Date: Wed, 2 Oct 2019 07:40:42 -0500 Message-ID: <20191002124042.25593-6-dmurphy@ti.com> X-Mailer: git-send-email 2.22.0.214.g8dca754b1e In-Reply-To: <20191002124042.25593-1-dmurphy@ti.com> References: <20191002124042.25593-1-dmurphy@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Update the leds.h structure documentation to define the correct arguments. Signed-off-by: Dan Murphy --- include/linux/leds.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) -- 2.22.0.214.g8dca754b1e diff --git a/include/linux/leds.h b/include/linux/leds.h index 52e50183b963..242258f7d837 100644 --- a/include/linux/leds.h +++ b/include/linux/leds.h @@ -245,7 +245,7 @@ void led_set_brightness(struct led_classdev *led_cdev, /** * led_set_brightness_sync - set LED brightness synchronously * @led_cdev: the LED to set - * @brightness: the brightness to set it to + * @value: the brightness to set it to * * Set an LED's brightness immediately. This function will block * the caller for the time required for accessing device registers, @@ -298,8 +298,7 @@ void led_sysfs_enable(struct led_classdev *led_cdev); /** * led_compose_name - compose LED class device name * @dev: LED controller device object - * @child: child fwnode_handle describing a LED or a group of synchronized LEDs; - * it must be provided only for fwnode based LEDs + * @init_data: the LED class device initialization data * @led_classdev_name: composed LED class device name * * Create LED class device name basing on the provided init_data argument.