Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1064680pxu; Mon, 23 Nov 2020 10:41:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJwpN8d7EONorukPEvivAXT37P8QJmQYThSRra81DIvb6DH/4BiEX31Z2HZWoV7f5IWT7xOk X-Received: by 2002:a17:906:90c3:: with SMTP id v3mr834510ejw.433.1606156887349; Mon, 23 Nov 2020 10:41:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606156887; cv=none; d=google.com; s=arc-20160816; b=Qc931prbsGfIbr1uNasqnvl4FckBLFSs7pwSUEGJeD9x2Tn5QxGPJgognBmzP80chH 1P2kDV7U6AD1t4k/3Re4ThnHN7N5ZQKsq7xvJGcotiMX6uYI3ssaYdYMDhwnDnN65q0E WhoFYrFmoEEtN3YB4zoLrMQpG3gkGbi0tnArWuMgl948ZBtyxWWxeAWdepO+00IXBmCZ 2CQJh6UkXbgosqsaBJeLkP8rpgOS5m3CFmm6Fvwrt8tetbsvLibiOXB7kxPhjIseE4Rl OiqtjwRlzY95807tvJa52uU4PFTW++BevzqTprv7InNUFGEMaGLoMDz3ftSC1h4Sqj9E 7hMA== 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; bh=kpKfZ+VX7iSmTK9Mr8FJeJa6qjSCZcuTqFMQxJq/Zyk=; b=dv731UXDjZZaFJ7RWBfRqFm5TItPO32qdtqSAtJ4fiuAvdTq5Ae6pVfB5UxPrE1dFo u6wvu/uCdQeXa8OMPHtc/EiPOzHuj9+SpOQolkEVxHTIH6eCGigo//nlgjb+N3GRKfij bIqTVeCijSb/cQ5WLu0y7tsbyWEzfHz8LixukjMibUI9H1OtOFRyKCeN+VHEQNfuScn2 ESc0pRe4izP2A0/jNzPgCSEN/kQTWnf0m5YhaIbZ0HymEPkPwxorROiG2KRjETq2uSi+ D0d1W/gjhVJlcCTtrH8UAlaW1/0lgbAWn+9/y0PogJ5ZHTcSQbUweosUgQ8+bPgRIvGA cCKg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m14si6867897ejr.448.2020.11.23.10.41.04; Mon, 23 Nov 2020 10:41:27 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388651AbgKWSjI (ORCPT + 99 others); Mon, 23 Nov 2020 13:39:08 -0500 Received: from mx2.suse.de ([195.135.220.15]:59350 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387834AbgKWSiw (ORCPT ); Mon, 23 Nov 2020 13:38:52 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 12AA5AC91; Mon, 23 Nov 2020 18:38:50 +0000 (UTC) From: Nicolas Saenz Julienne To: u.kleine-koenig@pengutronix.de, linux-kernel@vger.kernel.org Cc: f.fainelli@gmail.com, linux-pwm@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, wahrenst@gmx.net, linux-input@vger.kernel.org, dmitry.torokhov@gmail.com, gregkh@linuxfoundation.org, devel@driverdev.osuosl.org, p.zabel@pengutronix.de, linux-gpio@vger.kernel.org, linus.walleij@linaro.org, linux-clk@vger.kernel.org, sboyd@kernel.org, linux-rpi-kernel@lists.infradead.org, bgolaszewski@baylibre.com, andy.shevchenko@gmail.com, Nicolas Saenz Julienne Subject: [PATCH v5 08/11] input: raspberrypi-ts: Release firmware handle when not needed Date: Mon, 23 Nov 2020 19:38:29 +0100 Message-Id: <20201123183833.18750-9-nsaenzjulienne@suse.de> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201123183833.18750-1-nsaenzjulienne@suse.de> References: <20201123183833.18750-1-nsaenzjulienne@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use devm_rpi_firmware_get() so as to make sure we release RPi's firmware interface when unbinding the device. Signed-off-by: Nicolas Saenz Julienne --- Changes since v3: - Release firmware handle in probe function Changes since v2: - Use devm_rpi_firmware_get(), instead of remove function drivers/input/touchscreen/raspberrypi-ts.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/raspberrypi-ts.c b/drivers/input/touchscreen/raspberrypi-ts.c index ef6aaed217cf..5000f5fd9ec3 100644 --- a/drivers/input/touchscreen/raspberrypi-ts.c +++ b/drivers/input/touchscreen/raspberrypi-ts.c @@ -160,7 +160,7 @@ static int rpi_ts_probe(struct platform_device *pdev) touchbuf = (u32)ts->fw_regs_phys; error = rpi_firmware_property(fw, RPI_FIRMWARE_FRAMEBUFFER_SET_TOUCHBUF, &touchbuf, sizeof(touchbuf)); - + rpi_firmware_put(fw); if (error || touchbuf != 0) { dev_warn(dev, "Failed to set touchbuf, %d\n", error); return error; -- 2.29.2