netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ming Lei <tom.leiming-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: "David S. Miller" <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>,
	Greg Kroah-Hartman
	<gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>
Cc: Oliver Neukum <oneukum-l3A5Bk7waGM@public.gmane.org>,
	netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Ming Lei <tom.leiming-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: [PATCH 2/7] usbnet:pegasus: remove usb_get/put_dev in .probe and .disconnect
Date: Tue, 12 Jun 2012 09:19:40 +0800	[thread overview]
Message-ID: <1339463985-9006-3-git-send-email-tom.leiming@gmail.com> (raw)
In-Reply-To: <1339463985-9006-1-git-send-email-tom.leiming-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

usb_device is parent device of usb_interface in the view of driver
model, so its reference count is always held during .probe/.disconnect
of usb_interface instance.

This patch just removes the unnecessay usb_get/put_dev.

Signed-off-by: Ming Lei <tom.leiming-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 drivers/net/usb/pegasus.c |    4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/net/usb/pegasus.c b/drivers/net/usb/pegasus.c
index 7023220..a0b5807 100644
--- a/drivers/net/usb/pegasus.c
+++ b/drivers/net/usb/pegasus.c
@@ -1329,8 +1329,6 @@ static int pegasus_probe(struct usb_interface *intf,
 	}
 	pegasus_count++;
 
-	usb_get_dev(dev);

  parent reply	other threads:[~2012-06-12  1:19 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-12  1:19 [PATCH 0/7] usbnet: misc cleanup Ming Lei
2012-06-12  1:19 ` [PATCH 1/7] usbnet: remove usb_get/put_dev in .probe and .disconnect Ming Lei
2012-06-12  1:19 ` [PATCH 3/7] usbnet:cdc-phonet: " Ming Lei
2012-06-12  1:19 ` [PATCH 5/7] usbnet: remove flag of EVENT_DEV_WAKING Ming Lei
     [not found] ` <1339463985-9006-1-git-send-email-tom.leiming-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-06-12  1:19   ` Ming Lei [this message]
2012-06-12  1:19   ` [PATCH 4/7] usbnet: remove EVENT_DEV_OPEN flag Ming Lei
     [not found]     ` <1339463985-9006-5-git-send-email-tom.leiming-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-06-12 18:14       ` Oliver Neukum
2012-06-13  2:12         ` Ming Lei
2012-06-13  4:47           ` Ming Lei
2012-06-13  7:40             ` Oliver Neukum
     [not found]               ` <201206130940.54817.oliver-GvhC2dPhHPQdnm+yROfE0A@public.gmane.org>
2012-06-13  8:28                 ` Bjørn Mork
     [not found]                   ` <87r4tjlio1.fsf-lbf33ChDnrE/G1V5fR+Y7Q@public.gmane.org>
2012-06-13  9:21                     ` Ming Lei
2012-06-12  1:19   ` [PATCH 6/7] usbnet: remove declaration for intr_complete Ming Lei
2012-06-12  1:19   ` [PATCH 7/7] usbnet: don't initialize transfer buffer before submit status URB Ming Lei
2012-06-13  1:51   ` [PATCH 0/7] usbnet: misc cleanup David Miller

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=1339463985-9006-3-git-send-email-tom.leiming@gmail.com \
    --to=tom.leiming-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org \
    --cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
    --cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=oneukum-l3A5Bk7waGM@public.gmane.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).