DriverDev-Devel Archive on lore.kernel.org
 help / color / Atom feed
From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
To: u.kleine-koenig@pengutronix.de, linux-kernel@vger.kernel.org
Cc: devel@driverdev.osuosl.org, linux-pwm@vger.kernel.org,
	f.fainelli@gmail.com, devicetree@vger.kernel.org,
	sboyd@kernel.org, gregkh@linuxfoundation.org,
	linus.walleij@linaro.org, dmitry.torokhov@gmail.com,
	linux-gpio@vger.kernel.org, andy.shevchenko@gmail.com,
	bcm-kernel-feedback-list@broadcom.com, wahrenst@gmx.net,
	p.zabel@pengutronix.de, linux-input@vger.kernel.org,
	Nicolas Saenz Julienne <nsaenzjulienne@suse.de>,
	bgolaszewski@baylibre.com, linux-clk@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-rpi-kernel@lists.infradead.org
Subject: [PATCH v4 08/11] input: raspberrypi-ts: Release firmware handle when not needed
Date: Thu, 12 Nov 2020 17:36:26 +0100
Message-ID: <20201112163630.17177-9-nsaenzjulienne@suse.de> (raw)
In-Reply-To: <20201112163630.17177-1-nsaenzjulienne@suse.de>

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 <nsaenzjulienne@suse.de>
---

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

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

  parent reply index

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-12 16:36 [PATCH v4 00/11] Raspberry Pi PoE HAT fan support Nicolas Saenz Julienne
2020-11-12 16:36 ` [PATCH v4 01/11] firmware: raspberrypi: Keep count of all consumers Nicolas Saenz Julienne
2020-11-12 17:52   ` Andy Shevchenko
2020-11-13  7:26     ` Dmitry Torokhov
2020-11-23 17:19       ` Nicolas Saenz Julienne
2020-11-12 16:36 ` [PATCH v4 02/11] firmware: raspberrypi: Introduce devm_rpi_firmware_get() Nicolas Saenz Julienne
2020-11-12 17:25   ` Bartosz Golaszewski
2020-11-13  9:21     ` Nicolas Saenz Julienne
2020-11-12 16:36 ` [PATCH v4 03/11] clk: bcm: rpi: Release firmware handle on unbind Nicolas Saenz Julienne
2020-11-12 16:36 ` [PATCH v4 04/11] gpio: raspberrypi-exp: " Nicolas Saenz Julienne
2020-11-12 16:36 ` [PATCH v4 05/11] reset: raspberrypi: " Nicolas Saenz Julienne
2020-11-12 16:36 ` [PATCH v4 06/11] soc: bcm: raspberrypi-power: " Nicolas Saenz Julienne
2020-11-12 16:36 ` [PATCH v4 07/11] staging: vchiq: " Nicolas Saenz Julienne
2020-11-12 16:36 ` Nicolas Saenz Julienne [this message]
2020-11-12 16:36 ` [PATCH v4 09/11] dt-bindings: pwm: Add binding for RPi firmware PWM bus Nicolas Saenz Julienne
2020-11-12 16:36 ` [PATCH v4 10/11] DO NOT MERGE: ARM: dts: Add RPi's official PoE hat support Nicolas Saenz Julienne
2020-11-12 16:36 ` [PATCH v4 11/11] pwm: Add Raspberry Pi Firmware based PWM bus Nicolas Saenz Julienne

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201112163630.17177-9-nsaenzjulienne@suse.de \
    --to=nsaenzjulienne@suse.de \
    --cc=andy.shevchenko@gmail.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=bgolaszewski@baylibre.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=f.fainelli@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=linux-rpi-kernel@lists.infradead.org \
    --cc=p.zabel@pengutronix.de \
    --cc=sboyd@kernel.org \
    --cc=u.kleine-koenig@pengutronix.de \
    --cc=wahrenst@gmx.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

DriverDev-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/driverdev-devel/0 driverdev-devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 driverdev-devel driverdev-devel/ https://lore.kernel.org/driverdev-devel \
		driverdev-devel@linuxdriverproject.org devel@driverdev.osuosl.org
	public-inbox-index driverdev-devel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.linuxdriverproject.driverdev-devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git