From: Antti Palosaari Date: Sun, 26 Oct 2014 01:23:09 +0000 (-0300) Subject: [media] mn88472: rename mn88472_c.c => mn88472.c X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=5ef1ad351c3f02ea5be0268f5f71a2eefafcb166;p=linux-beck.git [media] mn88472: rename mn88472_c.c => mn88472.c Original plan was to implement driver as one file per used demod standard (mn88472_c.c, mn88472_t.c and mn88472_t2.c). However, that plan was a mistake as driver code differences are so small between different standards. Due to that rename this file and implement all the needed functionality to that file. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/dvb-frontends/Makefile b/drivers/media/dvb-frontends/Makefile index 27d82b6a7ff3..b82225f6781c 100644 --- a/drivers/media/dvb-frontends/Makefile +++ b/drivers/media/dvb-frontends/Makefile @@ -15,7 +15,6 @@ stv0900-objs := stv0900_core.o stv0900_sw.o drxd-objs := drxd_firm.o drxd_hard.o cxd2820r-objs := cxd2820r_core.o cxd2820r_c.o cxd2820r_t.o cxd2820r_t2.o drxk-objs := drxk_hard.o -mn88472-objs := mn88472_c.o obj-$(CONFIG_DVB_PLL) += dvb-pll.o obj-$(CONFIG_DVB_STV0299) += stv0299.o diff --git a/drivers/media/dvb-frontends/mn88472_c.c b/drivers/media/dvb-frontends/mn88472.c similarity index 90% rename from drivers/media/dvb-frontends/mn88472_c.c rename to drivers/media/dvb-frontends/mn88472.c index b5bd326d9e66..a3c4ae15520e 100644 --- a/drivers/media/dvb-frontends/mn88472_c.c +++ b/drivers/media/dvb-frontends/mn88472.c @@ -16,7 +16,7 @@ #include "mn88472_priv.h" -static struct dvb_frontend_ops mn88472_ops_c; +static struct dvb_frontend_ops mn88472_ops; /* write multiple registers */ static int mn88472_wregs(struct mn88472_state *s, u16 reg, const u8 *val, int len) @@ -112,7 +112,7 @@ static int mn88472_get_tune_settings(struct dvb_frontend *fe, return 0; } -static int mn88472_set_frontend_c(struct dvb_frontend *fe) +static int mn88472_set_frontend(struct dvb_frontend *fe) { struct mn88472_state *s = fe->demodulator_priv; struct dtv_frontend_properties *c = &fe->dtv_property_cache; @@ -216,7 +216,7 @@ err: return ret; } -static int mn88472_read_status_c(struct dvb_frontend *fe, fe_status_t *status) +static int mn88472_read_status(struct dvb_frontend *fe, fe_status_t *status) { struct mn88472_state *s = fe->demodulator_priv; int ret; @@ -243,7 +243,7 @@ err: return ret; } -static int mn88472_init_c(struct dvb_frontend *fe) +static int mn88472_init(struct dvb_frontend *fe) { struct mn88472_state *s = fe->demodulator_priv; int ret, len, remaining; @@ -313,7 +313,7 @@ err: return ret; } -static int mn88472_sleep_c(struct dvb_frontend *fe) +static int mn88472_sleep(struct dvb_frontend *fe) { struct mn88472_state *s = fe->demodulator_priv; int ret; @@ -336,13 +336,13 @@ err: return ret; } -static void mn88472_release_c(struct dvb_frontend *fe) +static void mn88472_release(struct dvb_frontend *fe) { struct mn88472_state *s = fe->demodulator_priv; kfree(s); } -struct dvb_frontend *mn88472_attach_c(const struct mn88472_c_config *cfg, +struct dvb_frontend *mn88472_attach(const struct mn88472_config *cfg, struct i2c_adapter *i2c) { int ret; @@ -367,7 +367,7 @@ struct dvb_frontend *mn88472_attach_c(const struct mn88472_c_config *cfg, goto err; /* create dvb_frontend */ - memcpy(&s->fe.ops, &mn88472_ops_c, sizeof(struct dvb_frontend_ops)); + memcpy(&s->fe.ops, &mn88472_ops, sizeof(struct dvb_frontend_ops)); s->fe.demodulator_priv = s; return &s->fe; @@ -376,9 +376,9 @@ err: kfree(s); return NULL; } -EXPORT_SYMBOL(mn88472_attach_c); +EXPORT_SYMBOL(mn88472_attach); -static struct dvb_frontend_ops mn88472_ops_c = { +static struct dvb_frontend_ops mn88472_ops = { .delsys = {SYS_DVBC_ANNEX_A}, .info = { .name = "Panasonic MN88472", @@ -403,18 +403,18 @@ static struct dvb_frontend_ops mn88472_ops_c = { FE_CAN_MULTISTREAM }, - .release = mn88472_release_c, + .release = mn88472_release, .get_tune_settings = mn88472_get_tune_settings, - .init = mn88472_init_c, - .sleep = mn88472_sleep_c, + .init = mn88472_init, + .sleep = mn88472_sleep, - .set_frontend = mn88472_set_frontend_c, -/* .get_frontend = mn88472_get_frontend_c, */ + .set_frontend = mn88472_set_frontend, +/* .get_frontend = mn88472_get_frontend, */ - .read_status = mn88472_read_status_c, -/* .read_snr = mn88472_read_snr_c, */ + .read_status = mn88472_read_status, +/* .read_snr = mn88472_read_snr, */ }; MODULE_AUTHOR("Antti Palosaari "); diff --git a/drivers/media/dvb-frontends/mn88472.h b/drivers/media/dvb-frontends/mn88472.h index c817bfba9681..5ce6ac1a7f06 100644 --- a/drivers/media/dvb-frontends/mn88472.h +++ b/drivers/media/dvb-frontends/mn88472.h @@ -19,7 +19,7 @@ #include -struct mn88472_c_config { +struct mn88472_config { /* * max bytes I2C client could write * Value must be set. @@ -28,13 +28,13 @@ struct mn88472_c_config { }; #if IS_ENABLED(CONFIG_DVB_MN88472) -extern struct dvb_frontend *mn88472_attach_c( - const struct mn88472_c_config *cfg, +extern struct dvb_frontend *mn88472_attach( + const struct mn88472_config *cfg, struct i2c_adapter *i2c ); #else -static inline struct dvb_frontend *mn88472_attach_c( - const struct mn88472_c_config *cfg, +static inline struct dvb_frontend *mn88472_attach( + const struct mn88472_config *cfg, struct i2c_adapter *i2c ) { diff --git a/drivers/media/dvb-frontends/mn88472_priv.h b/drivers/media/dvb-frontends/mn88472_priv.h index ecade84a0cf4..1aaa25fade4c 100644 --- a/drivers/media/dvb-frontends/mn88472_priv.h +++ b/drivers/media/dvb-frontends/mn88472_priv.h @@ -27,7 +27,7 @@ struct mn88472_state { struct i2c_adapter *i2c; - const struct mn88472_c_config *cfg; + const struct mn88472_config *cfg; struct dvb_frontend fe; fe_delivery_system_t delivery_system; bool warm; /* FW running */