public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Libor Pechacek <lpechacek@suse.cz>
To: Greg Kroah-Hartman <gregkh@suse.de>
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v2] USB: remove dead code from usb_deregister_dev()
Date: Fri, 25 Mar 2011 09:36:49 +0100	[thread overview]
Message-ID: <20110325083649.GC30773@fm.suse.cz> (raw)
In-Reply-To: <20110324132426.GA27561@fm.suse.cz>

The `name' variable is unused in usb_deregister_dev() since commit d6e5bcf
(devfs: Remove the mode field from usb_class_driver as it's no longer needed).

Signed-off-by: Libor Pechacek <lpechacek@suse.cz>
---
 drivers/usb/core/file.c |    8 --------
 1 files changed, 0 insertions(+), 8 deletions(-)

diff --git a/drivers/usb/core/file.c b/drivers/usb/core/file.c
index cf6a542..99458c8 100644
--- a/drivers/usb/core/file.c
+++ b/drivers/usb/core/file.c
@@ -236,13 +236,6 @@ EXPORT_SYMBOL_GPL(usb_register_dev);
 void usb_deregister_dev(struct usb_interface *intf,
 			struct usb_class_driver *class_driver)
 {
-	int minor_base = class_driver->minor_base;
-	char name[20];
-
-#ifdef CONFIG_USB_DYNAMIC_MINORS
-	minor_base = 0;
-#endif
-
 	if (intf->minor == -1)
 		return;
 
@@ -252,7 +245,6 @@ void usb_deregister_dev(struct usb_interface *intf,
 	usb_minors[intf->minor] = NULL;
 	up_write(&minor_rwsem);
 
-	snprintf(name, sizeof(name), class_driver->name, intf->minor - minor_base);
 	device_destroy(usb_class->class, MKDEV(USB_MAJOR, intf->minor));
 	intf->usb_dev = NULL;
 	intf->minor = -1;
-- 
1.6.0.2

      parent reply	other threads:[~2011-03-25  8:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-24 13:24 [PATCH] USB: remove dead code from usb_deregister_dev() Libor Pechacek
2011-03-24 13:36 ` Sergei Shtylyov
2011-03-25  8:34   ` Libor Pechacek
2011-03-25 12:50     ` Sergei Shtylyov
2011-03-25  8:36 ` Libor Pechacek [this message]

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=20110325083649.GC30773@fm.suse.cz \
    --to=lpechacek@suse.cz \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.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