aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/common/tuners/mt2063.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2011-07-21 10:00:59 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-01-04 19:20:34 -0500
commit3d49700fb162a3bc8e21bf3f304346d2e6269b3a (patch)
treece5a7edc0aeb47c7491fb94f24753b83a92a6a62 /drivers/media/common/tuners/mt2063.c
parentfad11dbc936cfd8483235f955b54636447a4425d (diff)
[media] mt2063: Rework on the publicly-exported functions
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/common/tuners/mt2063.c')
-rw-r--r--drivers/media/common/tuners/mt2063.c44
1 files changed, 13 insertions, 31 deletions
diff --git a/drivers/media/common/tuners/mt2063.c b/drivers/media/common/tuners/mt2063.c
index 53e3960eb7c0..0bf629292fe4 100644
--- a/drivers/media/common/tuners/mt2063.c
+++ b/drivers/media/common/tuners/mt2063.c
@@ -320,53 +320,34 @@ static u32 MT2063_SoftwareShutdown(struct mt2063_state *state, u8 Shutdown);
320static u32 MT2063_ClearPowerMaskBits(struct mt2063_state *state, enum MT2063_Mask_Bits Bits); 320static u32 MT2063_ClearPowerMaskBits(struct mt2063_state *state, enum MT2063_Mask_Bits Bits);
321 321
322 322
323/*****************/ 323/*
324/* From drivers/media/common/tuners/mt2063_cfg.h */ 324 * Ancillary routines visible outside mt2063
325 325 */
326
327unsigned int tuner_MT2063_SoftwareShutdown(struct dvb_frontend *fe) 326unsigned int tuner_MT2063_SoftwareShutdown(struct dvb_frontend *fe)
328{ 327{
329 struct mt2063_state *state = fe->tuner_priv; 328 struct mt2063_state *state = fe->tuner_priv;
330 struct dvb_frontend_ops *frontend_ops = &fe->ops;
331 struct dvb_tuner_ops *tuner_ops = &frontend_ops->tuner_ops;
332 int err = 0; 329 int err = 0;
333 330
334 if (&fe->ops) 331 err = MT2063_SoftwareShutdown(state, 1);
335 frontend_ops = &fe->ops; 332 if (err < 0)
336 if (&frontend_ops->tuner_ops) 333 printk(KERN_ERR "%s: Couldn't shutdown\n", __func__);
337 tuner_ops = &frontend_ops->tuner_ops;
338 if (tuner_ops->set_state) {
339 err = MT2063_SoftwareShutdown(state, 1);
340 if (err < 0) {
341 printk("%s: Invalid parameter\n", __func__);
342 return err;
343 }
344 }
345 334
346 return err; 335 return err;
347} 336}
337EXPORT_SYMBOL_GPL(tuner_MT2063_SoftwareShutdown);
348 338
349unsigned int tuner_MT2063_ClearPowerMaskBits(struct dvb_frontend *fe) 339unsigned int tuner_MT2063_ClearPowerMaskBits(struct dvb_frontend *fe)
350{ 340{
351 struct mt2063_state *state = fe->tuner_priv; 341 struct mt2063_state *state = fe->tuner_priv;
352 struct dvb_frontend_ops *frontend_ops = &fe->ops;
353 struct dvb_tuner_ops *tuner_ops = &frontend_ops->tuner_ops;
354 int err = 0; 342 int err = 0;
355 343
356 if (&fe->ops) 344 err = MT2063_ClearPowerMaskBits(state, MT2063_ALL_SD);
357 frontend_ops = &fe->ops; 345 if (err < 0)
358 if (&frontend_ops->tuner_ops) 346 printk(KERN_ERR "%s: Invalid parameter\n", __func__);
359 tuner_ops = &frontend_ops->tuner_ops;
360 if (tuner_ops->set_state) {
361 err = MT2063_ClearPowerMaskBits(state, MT2063_ALL_SD);
362 if (err < 0) {
363 printk("%s: Invalid parameter\n", __func__);
364 return err;
365 }
366 }
367 347
368 return err; 348 return err;
369} 349}
350EXPORT_SYMBOL_GPL(tuner_MT2063_ClearPowerMaskBits);
370 351
371/* 352/*
372 * mt2063_write - Write data into the I2C bus 353 * mt2063_write - Write data into the I2C bus
@@ -1173,6 +1154,7 @@ unsigned int mt2063_lockStatus(struct mt2063_state *state)
1173 */ 1154 */
1174 return 0; 1155 return 0;
1175} 1156}
1157EXPORT_SYMBOL_GPL(mt2063_lockStatus);
1176 1158
1177/**************************************************************************** 1159/****************************************************************************
1178** 1160**
@@ -3333,8 +3315,8 @@ error:
3333 kfree(state); 3315 kfree(state);
3334 return NULL; 3316 return NULL;
3335} 3317}
3318EXPORT_SYMBOL_GPL(mt2063_attach);
3336 3319
3337EXPORT_SYMBOL(mt2063_attach);
3338MODULE_PARM_DESC(verbose, "Set Verbosity level"); 3320MODULE_PARM_DESC(verbose, "Set Verbosity level");
3339 3321
3340MODULE_AUTHOR("Henry"); 3322MODULE_AUTHOR("Henry");