Skip to contentSkip to conversation

Patch "bcma: use (get|put)_device when probing/removing device driver" has been added to the 4.10-stable tree

PATCH [email protected] 1 participant 1 message Mar 10, 2017

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

bcma: use (get|put)_device when probing/removing device driver

to the 4.10-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
bcma-use-get-put-_device-when-probing-removing-device-driver.patch
and it can be found in the queue-4.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From a971df0b9d04674e325346c17de9a895425ca5e1 Mon Sep 17 00:00:00 2001

From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <[email protected]>
Date: Sat, 28 Jan 2017 14:31:22 +0100
Subject: bcma: use (get|put)_device when probing/removing device driver
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

From: Rafał Miłecki <[email protected]>

commit a971df0b9d04674e325346c17de9a895425ca5e1 upstream.

This allows tracking device state and e.g. makes devm work as expected.

---
 drivers/bcma/main.c |    4 ++++
 1 file changed, 4 insertions(+)
drivers/bcma/main.c +4 -0
@@ -633,8 +633,11 @@ static int bcma_device_probe(struct devi
 					       drv);
 	int err = 0;
 
+	get_device(dev);
 	if (adrv->probe)
 		err = adrv->probe(core);
+	if (err)
+		put_device(dev);
 
 	return err;
 }
@@ -647,6 +650,7 @@ static int bcma_device_remove(struct dev
 
 	if (adrv->remove)
 		adrv->remove(core);
+	put_device(dev);
 
 	return 0;
 }

Patches currently in stable-queue which might be from [email protected] are

queue-4.10/mips-bcm47xx-fix-button-inversion-for-asus-wl-500w.patch queue-4.10/bcma-use-get-put-_device-when-probing-removing-device-driver.patch