aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/hisax
diff options
context:
space:
mode:
authorJulia Lawall <julia@diku.dk>2011-05-13 00:15:39 -0400
committerDavid S. Miller <davem@davemloft.net>2011-05-13 16:10:00 -0400
commit5310cbce900094dce5df4a671b411e15319a75d4 (patch)
treed068d8c1eeb56a629f68cac0aa14d901d64560b8 /drivers/isdn/hisax
parentc319b4d76b9e583a5d88d6bf190e079c4e43213d (diff)
drivers/isdn/hisax: Drop unused list
The file st5481_init.c locally defines and initializes the adapter_list variable, but does not use it for anything. Removing the list makes it possible to remove the list field from the st5481_adapter data structure. In the function probe_st5481, it also makes it possible to free the locally allocated adapter value on an error exit. Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/isdn/hisax')
-rw-r--r--drivers/isdn/hisax/st5481.h1
-rw-r--r--drivers/isdn/hisax/st5481_init.c6
2 files changed, 1 insertions, 6 deletions
diff --git a/drivers/isdn/hisax/st5481.h b/drivers/isdn/hisax/st5481.h
index 64f78a8c28c5..b9054cb7a0da 100644
--- a/drivers/isdn/hisax/st5481.h
+++ b/drivers/isdn/hisax/st5481.h
@@ -377,7 +377,6 @@ struct st5481_bcs {
377}; 377};
378 378
379struct st5481_adapter { 379struct st5481_adapter {
380 struct list_head list;
381 int number_of_leds; 380 int number_of_leds;
382 struct usb_device *usb_dev; 381 struct usb_device *usb_dev;
383 struct hisax_d_if hisax_d_if; 382 struct hisax_d_if hisax_d_if;
diff --git a/drivers/isdn/hisax/st5481_init.c b/drivers/isdn/hisax/st5481_init.c
index 13751237bfcd..9f7fd18ff773 100644
--- a/drivers/isdn/hisax/st5481_init.c
+++ b/drivers/isdn/hisax/st5481_init.c
@@ -46,8 +46,6 @@ module_param(debug, int, 0);
46#endif 46#endif
47int st5481_debug; 47int st5481_debug;
48 48
49static LIST_HEAD(adapter_list);
50
51/* ====================================================================== 49/* ======================================================================
52 * registration/deregistration with the USB layer 50 * registration/deregistration with the USB layer
53 */ 51 */
@@ -86,7 +84,6 @@ static int probe_st5481(struct usb_interface *intf,
86 adapter->bcs[i].b_if.ifc.priv = &adapter->bcs[i]; 84 adapter->bcs[i].b_if.ifc.priv = &adapter->bcs[i];
87 adapter->bcs[i].b_if.ifc.l2l1 = st5481_b_l2l1; 85 adapter->bcs[i].b_if.ifc.l2l1 = st5481_b_l2l1;
88 } 86 }
89 list_add(&adapter->list, &adapter_list);
90 87
91 retval = st5481_setup_usb(adapter); 88 retval = st5481_setup_usb(adapter);
92 if (retval < 0) 89 if (retval < 0)
@@ -125,6 +122,7 @@ static int probe_st5481(struct usb_interface *intf,
125 err_usb: 122 err_usb:
126 st5481_release_usb(adapter); 123 st5481_release_usb(adapter);
127 err: 124 err:
125 kfree(adapter);
128 return -EIO; 126 return -EIO;
129} 127}
130 128
@@ -142,8 +140,6 @@ static void disconnect_st5481(struct usb_interface *intf)
142 if (!adapter) 140 if (!adapter)
143 return; 141 return;
144 142
145 list_del(&adapter->list);
146
147 st5481_stop(adapter); 143 st5481_stop(adapter);
148 st5481_release_b(&adapter->bcs[1]); 144 st5481_release_b(&adapter->bcs[1]);
149 st5481_release_b(&adapter->bcs[0]); 145 st5481_release_b(&adapter->bcs[0]);