Skip to content

Commit

Permalink
[media] em28xx: add em28xx_ prefix to functions
Browse files Browse the repository at this point in the history
Makes it more straight-forward to follow stack traces if the functions
don't have generic names. Using this as a crutch while trying to better
understand the lockdep warnings I get when loading the em28xx driver.

CC: Devin Heitmueller <[email protected]>
Signed-off-by: Jarod Wilson <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
  • Loading branch information
jarodwilson authored and Mauro Carvalho Chehab committed Sep 3, 2011
1 parent 2f00e15 commit f2d0c1c
Showing 1 changed file with 28 additions and 30 deletions.
58 changes: 28 additions & 30 deletions drivers/media/video/em28xx/em28xx-dvb.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ static inline void print_err_status(struct em28xx *dev,
}
}

static inline int dvb_isoc_copy(struct em28xx *dev, struct urb *urb)
static inline int em28xx_dvb_isoc_copy(struct em28xx *dev, struct urb *urb)
{
int i;

Expand Down Expand Up @@ -155,7 +155,7 @@ static inline int dvb_isoc_copy(struct em28xx *dev, struct urb *urb)
return 0;
}

static int start_streaming(struct em28xx_dvb *dvb)
static int em28xx_start_streaming(struct em28xx_dvb *dvb)
{
int rc;
struct em28xx *dev = dvb->adapter.priv;
Expand All @@ -175,10 +175,10 @@ static int start_streaming(struct em28xx_dvb *dvb)

return em28xx_init_isoc(dev, EM28XX_DVB_MAX_PACKETS,
EM28XX_DVB_NUM_BUFS, max_dvb_packet_size,
dvb_isoc_copy);
em28xx_dvb_isoc_copy);
}

static int stop_streaming(struct em28xx_dvb *dvb)
static int em28xx_stop_streaming(struct em28xx_dvb *dvb)
{
struct em28xx *dev = dvb->adapter.priv;

Expand All @@ -189,7 +189,7 @@ static int stop_streaming(struct em28xx_dvb *dvb)
return 0;
}

static int start_feed(struct dvb_demux_feed *feed)
static int em28xx_start_feed(struct dvb_demux_feed *feed)
{
struct dvb_demux *demux = feed->demux;
struct em28xx_dvb *dvb = demux->priv;
Expand All @@ -203,7 +203,7 @@ static int start_feed(struct dvb_demux_feed *feed)
rc = dvb->nfeeds;

if (dvb->nfeeds == 1) {
ret = start_streaming(dvb);
ret = em28xx_start_streaming(dvb);
if (ret < 0)
rc = ret;
}
Expand All @@ -212,7 +212,7 @@ static int start_feed(struct dvb_demux_feed *feed)
return rc;
}

static int stop_feed(struct dvb_demux_feed *feed)
static int em28xx_stop_feed(struct dvb_demux_feed *feed)
{
struct dvb_demux *demux = feed->demux;
struct em28xx_dvb *dvb = demux->priv;
Expand All @@ -222,7 +222,7 @@ static int stop_feed(struct dvb_demux_feed *feed)
dvb->nfeeds--;

if (0 == dvb->nfeeds)
err = stop_streaming(dvb);
err = em28xx_stop_streaming(dvb);

mutex_unlock(&dvb->lock);
return err;
Expand Down Expand Up @@ -380,7 +380,7 @@ static void terratec_h5_init(struct em28xx *dev)
em28xx_gpio_set(dev, terratec_h5_end);
};

static int mt352_terratec_xs_init(struct dvb_frontend *fe)
static int em28xx_mt352_terratec_xs_init(struct dvb_frontend *fe)
{
/* Values extracted from a USB trace of the Terratec Windows driver */
static u8 clock_config[] = { CLOCK_CTL, 0x38, 0x2c };
Expand Down Expand Up @@ -412,7 +412,7 @@ static struct mt352_config terratec_xs_mt352_cfg = {
.demod_address = (0x1e >> 1),
.no_tuner = 1,
.if2 = 45600,
.demod_init = mt352_terratec_xs_init,
.demod_init = em28xx_mt352_terratec_xs_init,
};

static struct tda10023_config em28xx_tda10023_config = {
Expand Down Expand Up @@ -442,7 +442,7 @@ static struct tda18271_config em28xx_cxd2820r_tda18271_config = {

/* ------------------------------------------------------------------ */

static int attach_xc3028(u8 addr, struct em28xx *dev)
static int em28xx_attach_xc3028(u8 addr, struct em28xx *dev)
{
struct dvb_frontend *fe;
struct xc2028_config cfg;
Expand Down Expand Up @@ -472,10 +472,8 @@ static int attach_xc3028(u8 addr, struct em28xx *dev)

/* ------------------------------------------------------------------ */

static int register_dvb(struct em28xx_dvb *dvb,
struct module *module,
struct em28xx *dev,
struct device *device)
static int em28xx_register_dvb(struct em28xx_dvb *dvb, struct module *module,
struct em28xx *dev, struct device *device)
{
int result;

Expand Down Expand Up @@ -522,8 +520,8 @@ static int register_dvb(struct em28xx_dvb *dvb,
dvb->demux.priv = dvb;
dvb->demux.filternum = 256;
dvb->demux.feednum = 256;
dvb->demux.start_feed = start_feed;
dvb->demux.stop_feed = stop_feed;
dvb->demux.start_feed = em28xx_start_feed;
dvb->demux.stop_feed = em28xx_stop_feed;

result = dvb_dmx_init(&dvb->demux);
if (result < 0) {
Expand Down Expand Up @@ -591,7 +589,7 @@ static int register_dvb(struct em28xx_dvb *dvb,
return result;
}

static void unregister_dvb(struct em28xx_dvb *dvb)
static void em28xx_unregister_dvb(struct em28xx_dvb *dvb)
{
dvb_net_release(&dvb->net);
dvb->demux.dmx.remove_frontend(&dvb->demux.dmx, &dvb->fe_mem);
Expand All @@ -607,7 +605,7 @@ static void unregister_dvb(struct em28xx_dvb *dvb)
dvb_unregister_adapter(&dvb->adapter);
}

static int dvb_init(struct em28xx *dev)
static int em28xx_dvb_init(struct em28xx *dev)
{
int result = 0, mfe_shared = 0;
struct em28xx_dvb *dvb;
Expand Down Expand Up @@ -648,7 +646,7 @@ static int dvb_init(struct em28xx *dev)
dvb->fe[0] = dvb_attach(lgdt330x_attach,
&em2880_lgdt3303_dev,
&dev->i2c_adap);
if (attach_xc3028(0x61, dev) < 0) {
if (em28xx_attach_xc3028(0x61, dev) < 0) {
result = -EINVAL;
goto out_free;
}
Expand All @@ -657,7 +655,7 @@ static int dvb_init(struct em28xx *dev)
dvb->fe[0] = dvb_attach(zl10353_attach,
&em28xx_zl10353_with_xc3028,
&dev->i2c_adap);
if (attach_xc3028(0x61, dev) < 0) {
if (em28xx_attach_xc3028(0x61, dev) < 0) {
result = -EINVAL;
goto out_free;
}
Expand All @@ -668,7 +666,7 @@ static int dvb_init(struct em28xx *dev)
dvb->fe[0] = dvb_attach(zl10353_attach,
&em28xx_zl10353_xc3028_no_i2c_gate,
&dev->i2c_adap);
if (attach_xc3028(0x61, dev) < 0) {
if (em28xx_attach_xc3028(0x61, dev) < 0) {
result = -EINVAL;
goto out_free;
}
Expand All @@ -689,7 +687,7 @@ static int dvb_init(struct em28xx *dev)
&dev->i2c_adap);
}

if (attach_xc3028(0x61, dev) < 0) {
if (em28xx_attach_xc3028(0x61, dev) < 0) {
result = -EINVAL;
goto out_free;
}
Expand All @@ -699,7 +697,7 @@ static int dvb_init(struct em28xx *dev)
dvb->fe[0] = dvb_attach(s5h1409_attach,
&em28xx_s5h1409_with_xc3028,
&dev->i2c_adap);
if (attach_xc3028(0x61, dev) < 0) {
if (em28xx_attach_xc3028(0x61, dev) < 0) {
result = -EINVAL;
goto out_free;
}
Expand All @@ -720,7 +718,7 @@ static int dvb_init(struct em28xx *dev)
case EM2882_BOARD_PINNACLE_HYBRID_PRO_330E:
dvb->fe[0] = dvb_attach(drxd_attach, &em28xx_drxd, NULL,
&dev->i2c_adap, &dev->udev->dev);
if (attach_xc3028(0x61, dev) < 0) {
if (em28xx_attach_xc3028(0x61, dev) < 0) {
result = -EINVAL;
goto out_free;
}
Expand Down Expand Up @@ -825,7 +823,7 @@ static int dvb_init(struct em28xx *dev)
dvb->fe[0]->callback = em28xx_tuner_callback;

/* register everything */
result = register_dvb(dvb, THIS_MODULE, dev, &dev->udev->dev);
result = em28xx_register_dvb(dvb, THIS_MODULE, dev, &dev->udev->dev);

if (result < 0)
goto out_free;
Expand All @@ -845,15 +843,15 @@ static int dvb_init(struct em28xx *dev)
goto ret;
}

static int dvb_fini(struct em28xx *dev)
static int em28xx_dvb_fini(struct em28xx *dev)
{
if (!dev->board.has_dvb) {
/* This device does not support the extension */
return 0;
}

if (dev->dvb) {
unregister_dvb(dev->dvb);
em28xx_unregister_dvb(dev->dvb);
kfree(dev->dvb);
dev->dvb = NULL;
}
Expand All @@ -864,8 +862,8 @@ static int dvb_fini(struct em28xx *dev)
static struct em28xx_ops dvb_ops = {
.id = EM28XX_DVB,
.name = "Em28xx dvb Extension",
.init = dvb_init,
.fini = dvb_fini,
.init = em28xx_dvb_init,
.fini = em28xx_dvb_fini,
};

static int __init em28xx_dvb_register(void)
Expand Down

0 comments on commit f2d0c1c

Please sign in to comment.