projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2a2a5d1
)
bcma: use (get|put)_device when probing/removing device driver
author
Rafał Miłecki
<rafal@milecki.pl>
Sat, 28 Jan 2017 13:31:22 +0000
(14:31 +0100)
committer
Kalle Valo
<kvalo@codeaurora.org>
Tue, 31 Jan 2017 07:27:09 +0000
(09:27 +0200)
This allows tracking device state and e.g. makes devm work as expected.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Cc: Stable <stable@vger.kernel.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/bcma/main.c
patch
|
blob
|
history
diff --git
a/drivers/bcma/main.c
b/drivers/bcma/main.c
index
2c1798e
..
3868823
100644
(file)
--- a/
drivers/bcma/main.c
+++ b/
drivers/bcma/main.c
@@
-633,8
+633,11
@@
static int bcma_device_probe(struct device *dev)
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 device *dev)
if (adrv->remove)
adrv->remove(core);
+ put_device(dev);
return 0;
}