linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC/T] rt2x00: Remove redundant code in rfkill setup
@ 2007-11-27 17:04 Larry Finger
  2007-11-27 19:43 ` [Rt2400-devel] " Ivo van Doorn
  0 siblings, 1 reply; 2+ messages in thread
From: Larry Finger @ 2007-11-27 17:04 UTC (permalink / raw)
  To: rt2400-devel; +Cc: linux-wireless

In rt2x00rfkill.c, routine input_allocate_device() is called even though
input_allocate_polled_device(), which was just called, includes a call to
that routine. This patch, which has not been tested, removes the redundant code.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
---

Index: wireless-2.6/drivers/net/wireless/rt2x00/rt2x00rfkill.c
===================================================================
--- wireless-2.6.orig/drivers/net/wireless/rt2x00/rt2x00rfkill.c
+++ wireless-2.6/drivers/net/wireless/rt2x00/rt2x00rfkill.c
@@ -141,12 +141,6 @@ int rt2x00rfkill_allocate(struct rt2x00_
 	rt2x00dev->poll_dev->poll = rt2x00rfkill_poll;
 	rt2x00dev->poll_dev->poll_interval = RFKILL_POLL_INTERVAL;
 
-	rt2x00dev->poll_dev->input = input_allocate_device();
-	if (!rt2x00dev->poll_dev->input) {
-		ERROR(rt2x00dev, "Failed to allocate input device.\n");
-		goto exit_free_polldev;
-	}
-
 	rt2x00dev->poll_dev->input->name = rt2x00dev->ops->name;
 	rt2x00dev->poll_dev->input->phys = wiphy_name(rt2x00dev->hw->wiphy);
 	rt2x00dev->poll_dev->input->id.bustype = BUS_HOST;

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-11-27 18:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-27 17:04 [RFC/T] rt2x00: Remove redundant code in rfkill setup Larry Finger
2007-11-27 19:43 ` [Rt2400-devel] " Ivo van Doorn

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).