From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:33674 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755325AbdCJIpy (ORCPT ); Fri, 10 Mar 2017 03:45:54 -0500 Subject: Patch "bcma: use (get|put)_device when probing/removing device driver" has been added to the 4.10-stable tree To: rafal@milecki.pl, gregkh@linuxfoundation.org, kvalo@codeaurora.org Cc: , From: Date: Fri, 10 Mar 2017 09:38:31 +0100 Message-ID: <148913511113193@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: 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 know about it. >>From a971df0b9d04674e325346c17de9a895425ca5e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= 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 commit a971df0b9d04674e325346c17de9a895425ca5e1 upstream. This allows tracking device state and e.g. makes devm work as expected. Signed-off-by: Rafał Miłecki Signed-off-by: Kalle Valo Signed-off-by: Greg Kroah-Hartman --- drivers/bcma/main.c | 4 ++++ 1 file changed, 4 insertions(+) --- a/drivers/bcma/main.c +++ b/drivers/bcma/main.c @@ -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 rafal@milecki.pl 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