Commit b68e9d40 authored by Maximilian Attems's avatar Maximilian Attems Committed by Linus Torvalds

[PATCH] drivers: remove unused MOD_{DEC,INC}_USE_COUNT

hch send in a patch to remove MOD_{DEC,INC}_USE_COUNT.  Let's also remove
useless references to it (comments, old ifdefs).
Signed-off-by: default avatarmaximilian attems <janitor@sternwelten.at>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 0fe7d7f3
...@@ -246,8 +246,6 @@ hycapi_register_appl(struct capi_ctr *ctrl, __u16 appl, ...@@ -246,8 +246,6 @@ hycapi_register_appl(struct capi_ctr *ctrl, __u16 appl,
rp->level3cnt = MaxLogicalConnections; rp->level3cnt = MaxLogicalConnections;
memcpy(&hycapi_applications[appl-1].rp, memcpy(&hycapi_applications[appl-1].rp,
rp, sizeof(capi_register_params)); rp, sizeof(capi_register_params));
/* MOD_INC_USE_COUNT; */
} }
/********************************************************************* /*********************************************************************
...@@ -311,7 +309,6 @@ hycapi_release_appl(struct capi_ctr *ctrl, __u16 appl) ...@@ -311,7 +309,6 @@ hycapi_release_appl(struct capi_ctr *ctrl, __u16 appl)
{ {
hycapi_release_internal(ctrl, appl); hycapi_release_internal(ctrl, appl);
} }
/* MOD_DEC_USE_COUNT; */
} }
......
...@@ -364,7 +364,7 @@ static void *bsd_alloc (struct isdn_ppp_comp_data *data) ...@@ -364,7 +364,7 @@ static void *bsd_alloc (struct isdn_ppp_comp_data *data)
db->lens = (unsigned short *) vmalloc ((maxmaxcode + 1) * db->lens = (unsigned short *) vmalloc ((maxmaxcode + 1) *
sizeof (db->lens[0])); sizeof (db->lens[0]));
if (!db->lens) { if (!db->lens) {
bsd_free (db); /* calls MOD_DEC_USE_COUNT; */ bsd_free (db);
return (NULL); return (NULL);
} }
} }
......
...@@ -306,21 +306,6 @@ static struct i2c_adapter bttv_i2c_adap_hw_template = { ...@@ -306,21 +306,6 @@ static struct i2c_adapter bttv_i2c_adap_hw_template = {
.client_unregister = detach_inform, .client_unregister = detach_inform,
}; };
/* ----------------------------------------------------------------------- */
/* I2C functions - common stuff */
#ifndef I2C_PEC
static void bttv_inc_use(struct i2c_adapter *adap)
{
MOD_INC_USE_COUNT;
}
static void bttv_dec_use(struct i2c_adapter *adap)
{
MOD_DEC_USE_COUNT;
}
#endif
static int attach_inform(struct i2c_client *client) static int attach_inform(struct i2c_client *client)
{ {
struct bttv *btv = i2c_get_adapdata(client->adapter); struct bttv *btv = i2c_get_adapdata(client->adapter);
......
...@@ -311,18 +311,6 @@ static u32 functionality(struct i2c_adapter *adap) ...@@ -311,18 +311,6 @@ static u32 functionality(struct i2c_adapter *adap)
return I2C_FUNC_SMBUS_EMUL; return I2C_FUNC_SMBUS_EMUL;
} }
#ifndef I2C_PEC
static void inc_use(struct i2c_adapter *adap)
{
MOD_INC_USE_COUNT;
}
static void dec_use(struct i2c_adapter *adap)
{
MOD_DEC_USE_COUNT;
}
#endif
static int attach_inform(struct i2c_client *client) static int attach_inform(struct i2c_client *client)
{ {
struct saa7134_dev *dev = client->adapter->algo_data; struct saa7134_dev *dev = client->adapter->algo_data;
......
...@@ -812,12 +812,6 @@ static int lance_open(struct net_device *dev) ...@@ -812,12 +812,6 @@ static int lance_open(struct net_device *dev)
} }
status = init_restart_lance(lp); status = init_restart_lance(lp);
/*
* if (!status)
* MOD_INC_USE_COUNT;
*/
return status; return status;
} }
...@@ -849,9 +843,6 @@ static int lance_close(struct net_device *dev) ...@@ -849,9 +843,6 @@ static int lance_close(struct net_device *dev)
free_irq(lp->dma_irq, dev); free_irq(lp->dma_irq, dev);
} }
free_irq(dev->irq, dev); free_irq(dev->irq, dev);
/*
MOD_DEC_USE_COUNT;
*/
return 0; return 0;
} }
......
...@@ -312,9 +312,6 @@ static int full_duplex[MAX_UNITS] = {0, }; ...@@ -312,9 +312,6 @@ static int full_duplex[MAX_UNITS] = {0, };
#include <linux/if_vlan.h> #include <linux/if_vlan.h>
#define COMPAT_MOD_INC_USE_COUNT
#define COMPAT_MOD_DEC_USE_COUNT
#define init_tx_timer(dev, func, timeout) \ #define init_tx_timer(dev, func, timeout) \
dev->tx_timeout = func; \ dev->tx_timeout = func; \
dev->watchdog_timeo = timeout; dev->watchdog_timeo = timeout;
...@@ -1110,14 +1107,9 @@ static int netdev_open(struct net_device *dev) ...@@ -1110,14 +1107,9 @@ static int netdev_open(struct net_device *dev)
size_t tx_done_q_size, rx_done_q_size, tx_ring_size, rx_ring_size; size_t tx_done_q_size, rx_done_q_size, tx_ring_size, rx_ring_size;
/* Do we ever need to reset the chip??? */ /* Do we ever need to reset the chip??? */
COMPAT_MOD_INC_USE_COUNT;
retval = request_irq(dev->irq, &intr_handler, SA_SHIRQ, dev->name, dev); retval = request_irq(dev->irq, &intr_handler, SA_SHIRQ, dev->name, dev);
if (retval) { if (retval)
COMPAT_MOD_DEC_USE_COUNT;
return retval; return retval;
}
/* Disable the Rx and Tx, and reset the chip. */ /* Disable the Rx and Tx, and reset the chip. */
writel(0, ioaddr + GenCtrl); writel(0, ioaddr + GenCtrl);
...@@ -1134,10 +1126,8 @@ static int netdev_open(struct net_device *dev) ...@@ -1134,10 +1126,8 @@ static int netdev_open(struct net_device *dev)
rx_ring_size = sizeof(struct starfire_rx_desc) * RX_RING_SIZE; rx_ring_size = sizeof(struct starfire_rx_desc) * RX_RING_SIZE;
np->queue_mem_size = tx_done_q_size + rx_done_q_size + tx_ring_size + rx_ring_size; np->queue_mem_size = tx_done_q_size + rx_done_q_size + tx_ring_size + rx_ring_size;
np->queue_mem = pci_alloc_consistent(np->pci_dev, np->queue_mem_size, &np->queue_mem_dma); np->queue_mem = pci_alloc_consistent(np->pci_dev, np->queue_mem_size, &np->queue_mem_dma);
if (np->queue_mem == 0) { if (np->queue_mem == 0)
COMPAT_MOD_DEC_USE_COUNT;
return -ENOMEM; return -ENOMEM;
}
np->tx_done_q = np->queue_mem; np->tx_done_q = np->queue_mem;
np->tx_done_q_dma = np->queue_mem_dma; np->tx_done_q_dma = np->queue_mem_dma;
...@@ -2150,8 +2140,6 @@ static int netdev_close(struct net_device *dev) ...@@ -2150,8 +2140,6 @@ static int netdev_close(struct net_device *dev)
np->tx_info[i].skb = NULL; np->tx_info[i].skb = NULL;
} }
COMPAT_MOD_DEC_USE_COUNT;
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment