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,
rp->level3cnt = MaxLogicalConnections;
memcpy(&hycapi_applications[appl-1].rp,
rp, sizeof(capi_register_params));
/* MOD_INC_USE_COUNT; */
}
/*********************************************************************
......@@ -311,7 +309,6 @@ hycapi_release_appl(struct capi_ctr *ctrl, __u16 appl)
{
hycapi_release_internal(ctrl, appl);
}
/* MOD_DEC_USE_COUNT; */
}
......
......@@ -364,7 +364,7 @@ static void *bsd_alloc (struct isdn_ppp_comp_data *data)
db->lens = (unsigned short *) vmalloc ((maxmaxcode + 1) *
sizeof (db->lens[0]));
if (!db->lens) {
bsd_free (db); /* calls MOD_DEC_USE_COUNT; */
bsd_free (db);
return (NULL);
}
}
......
......@@ -306,21 +306,6 @@ static struct i2c_adapter bttv_i2c_adap_hw_template = {
.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)
{
struct bttv *btv = i2c_get_adapdata(client->adapter);
......
......@@ -311,18 +311,6 @@ static u32 functionality(struct i2c_adapter *adap)
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)
{
struct saa7134_dev *dev = client->adapter->algo_data;
......
......@@ -812,12 +812,6 @@ static int lance_open(struct net_device *dev)
}
status = init_restart_lance(lp);
/*
* if (!status)
* MOD_INC_USE_COUNT;
*/
return status;
}
......@@ -849,9 +843,6 @@ static int lance_close(struct net_device *dev)
free_irq(lp->dma_irq, dev);
}
free_irq(dev->irq, dev);
/*
MOD_DEC_USE_COUNT;
*/
return 0;
}
......
......@@ -312,9 +312,6 @@ static int full_duplex[MAX_UNITS] = {0, };
#include <linux/if_vlan.h>
#define COMPAT_MOD_INC_USE_COUNT
#define COMPAT_MOD_DEC_USE_COUNT
#define init_tx_timer(dev, func, timeout) \
dev->tx_timeout = func; \
dev->watchdog_timeo = timeout;
......@@ -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;
/* 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);
if (retval) {
COMPAT_MOD_DEC_USE_COUNT;
if (retval)
return retval;
}
/* Disable the Rx and Tx, and reset the chip. */
writel(0, ioaddr + GenCtrl);
......@@ -1134,10 +1126,8 @@ static int netdev_open(struct net_device *dev)
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 = pci_alloc_consistent(np->pci_dev, np->queue_mem_size, &np->queue_mem_dma);
if (np->queue_mem == 0) {
COMPAT_MOD_DEC_USE_COUNT;
if (np->queue_mem == 0)
return -ENOMEM;
}
np->tx_done_q = np->queue_mem;
np->tx_done_q_dma = np->queue_mem_dma;
......@@ -2150,8 +2140,6 @@ static int netdev_close(struct net_device *dev)
np->tx_info[i].skb = NULL;
}
COMPAT_MOD_DEC_USE_COUNT;
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