summaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb-frontends/dib8000.h
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <m.chehab@samsung.com>2014-05-29 09:20:16 -0300
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-06-17 12:04:49 -0300
commitb9bc7d59b72511f8a51e847aedc39f74bfc102a3 (patch)
tree036410bab99e853d682fb896e66f5bd1e6d45bf6 /drivers/media/dvb-frontends/dib8000.h
parent8abe4a0a3f6d4217b16a1a3f68cd5c72ab5a058e (diff)
downloadblackbird-op-linux-b9bc7d59b72511f8a51e847aedc39f74bfc102a3.tar.gz
blackbird-op-linux-b9bc7d59b72511f8a51e847aedc39f74bfc102a3.zip
[media] dib8000: rename dib8000_attach to dib8000_init
Well, what we call as "foo_attach" is the method that should be called by the dvb_attach() macro. It should be noticed that the name "dvb_attach" is really a bad name and don't express what it does. dvb_attach() basically does three things, if the frontend is compiled as a module: - It lookups for the module that it is known to have the given symbol name and requests such module; - It increments the module usage (anonymously - so lsmod doesn't print who loaded the module); - after loading the module, it runs the function associated with the dynamic symbol. When compiled as builtin, it just calls the function given to it. As dvb_attach() increments refcount, it can't be (easily) called more than once for the same module, or the kernel will deny to remove the module, because refcount will never be zeroed. In other words, the function name given to dvb_attach() should be one single symbol that will always be called before any other function on that module to be used. For almost all DVB frontends, there's just one function, but, on dib8000, there are several exported symbols. We need to get rid of all those direct calls, because they cause compilation breakages when bridge is builtin and frontend is module, we'll need to add a new function that will be the first one to be called, whatever initialization is needed. So, let's rename this function, in order to prepare for a next patch that will add a new attach() function that will be the only one exported by this module. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/dvb-frontends/dib8000.h')
-rw-r--r--drivers/media/dvb-frontends/dib8000.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/dvb-frontends/dib8000.h b/drivers/media/dvb-frontends/dib8000.h
index b8c11e52c512..89962d640e4c 100644
--- a/drivers/media/dvb-frontends/dib8000.h
+++ b/drivers/media/dvb-frontends/dib8000.h
@@ -40,7 +40,7 @@ struct dib8000_config {
#define DEFAULT_DIB8000_I2C_ADDRESS 18
#if IS_ENABLED(CONFIG_DVB_DIB8000)
-extern struct dvb_frontend *dib8000_attach(struct i2c_adapter *i2c_adap, u8 i2c_addr, struct dib8000_config *cfg);
+extern struct dvb_frontend *dib8000_init(struct i2c_adapter *i2c_adap, u8 i2c_addr, struct dib8000_config *cfg);
extern struct i2c_adapter *dib8000_get_i2c_master(struct dvb_frontend *, enum dibx000_i2c_interface, int);
extern int dib8000_i2c_enumeration(struct i2c_adapter *host, int no_of_demods,
@@ -65,7 +65,7 @@ extern int dib8000_set_slave_frontend(struct dvb_frontend *fe, struct dvb_fronte
extern int dib8000_remove_slave_frontend(struct dvb_frontend *fe);
extern struct dvb_frontend *dib8000_get_slave_frontend(struct dvb_frontend *fe, int slave_index);
#else
-static inline struct dvb_frontend *dib8000_attach(struct i2c_adapter *i2c_adap, u8 i2c_addr, struct dib8000_config *cfg)
+static inline struct dvb_frontend *dib8000_init(struct i2c_adapter *i2c_adap, u8 i2c_addr, struct dib8000_config *cfg)
{
printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
return NULL;
OpenPOWER on IntegriCloud