]> err.no Git - linux-2.6/commitdiff
rt2x00: Remove redundant code in rfkill setup
authorLarry Finger <Larry.Finger@lwfinger.net>
Tue, 27 Nov 2007 20:51:39 +0000 (21:51 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Jan 2008 23:05:10 +0000 (15:05 -0800)
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>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rt2x00/rt2x00rfkill.c

index bbbf51d8a742a727aec25461866ae941ca4e92f5..74396372e95ca0a9a385de36806124a21ce2e80a 100644 (file)
@@ -136,12 +136,6 @@ int rt2x00rfkill_allocate(struct rt2x00_dev *rt2x00dev)
        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;