Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1655424 > unrolled thread
| Started by | Ben Hutchings <ben@decadent.org.uk> |
|---|---|
| First post | 2017-06-01 18:30 +0200 |
| Last post | 2017-06-01 18:30 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 3.16 085/212] bcma: use (get|put)_device when probing/removing device driver Ben Hutchings <ben@decadent.org.uk> - 2017-06-01 18:30 +0200
| From | Ben Hutchings <ben@decadent.org.uk> |
|---|---|
| Date | 2017-06-01 18:30 +0200 |
| Subject | [PATCH 3.16 085/212] bcma: use (get|put)_device when probing/removing device driver |
| Message-ID | <tNB91-4UR-47@gated-at.bofh.it> |
3.16.44-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Rafał Miłecki <rafal@milecki.pl> commit a971df0b9d04674e325346c17de9a895425ca5e1 upstream. This allows tracking device state and e.g. makes devm work as expected. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Signed-off-by: Ben Hutchings <ben@decadent.org.uk> --- drivers/bcma/main.c | 4 ++++ 1 file changed, 4 insertions(+) --- a/drivers/bcma/main.c +++ b/drivers/bcma/main.c @@ -450,8 +450,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; } @@ -464,6 +467,7 @@ static int bcma_device_remove(struct dev if (adrv->remove) adrv->remove(core); + put_device(dev); return 0; }
Back to top | Article view | linux.kernel
csiph-web