Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1e6be014 authored by Bhumika Goyal's avatar Bhumika Goyal Committed by Mauro Carvalho Chehab
Browse files

media: davinci: make function arguments const



Make the function arguments of functions vpfe_{register/unregister}_ccdc_device
const as the pointer dev does not modify the fields of the structure
it points to. Also, declare the variable ccdc_dev const as it points to the
same structure as dev but it does not modify the fields as well.

Signed-off-by: default avatarBhumika Goyal <bhumirks@gmail.com>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 1e7126b4
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -82,8 +82,8 @@ struct ccdc_hw_device {
};

/* Used by CCDC module to register & unregister with vpfe capture driver */
int vpfe_register_ccdc_device(struct ccdc_hw_device *dev);
void vpfe_unregister_ccdc_device(struct ccdc_hw_device *dev);
int vpfe_register_ccdc_device(const struct ccdc_hw_device *dev);
void vpfe_unregister_ccdc_device(const struct ccdc_hw_device *dev);

#endif
#endif
+3 −3
Original line number Diff line number Diff line
@@ -115,7 +115,7 @@ static struct vpfe_config_params config_params = {
};

/* ccdc device registered */
static struct ccdc_hw_device *ccdc_dev;
static const struct ccdc_hw_device *ccdc_dev;
/* lock for accessing ccdc information */
static DEFINE_MUTEX(ccdc_lock);
/* ccdc configuration */
@@ -203,7 +203,7 @@ static const struct vpfe_pixel_format *vpfe_lookup_pix_format(u32 pix_format)
 * vpfe_register_ccdc_device. CCDC module calls this to
 * register with vpfe capture
 */
int vpfe_register_ccdc_device(struct ccdc_hw_device *dev)
int vpfe_register_ccdc_device(const struct ccdc_hw_device *dev)
{
	int ret = 0;
	printk(KERN_NOTICE "vpfe_register_ccdc_device: %s\n", dev->name);
@@ -259,7 +259,7 @@ EXPORT_SYMBOL(vpfe_register_ccdc_device);
 * vpfe_unregister_ccdc_device. CCDC module calls this to
 * unregister with vpfe capture
 */
void vpfe_unregister_ccdc_device(struct ccdc_hw_device *dev)
void vpfe_unregister_ccdc_device(const struct ccdc_hw_device *dev)
{
	if (!dev) {
		printk(KERN_ERR "invalid ccdc device ptr\n");