mirror of https://gitee.com/openkylin/linux.git
media: atomisp: don't pass struct device_driver as parameter
There is no need to pass a pointer to struct device_driver when we have an access to struct device already. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
This commit is contained in:
parent
4f307131f3
commit
0697fd92e7
|
@ -185,8 +185,9 @@ static void iunit_drvfs_remove_files(struct device_driver *drv)
|
||||||
driver_remove_file(drv, &iunit_drvfs_attrs[i]);
|
driver_remove_file(drv, &iunit_drvfs_attrs[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
int atomisp_drvfs_init(struct device_driver *drv, struct atomisp_device *isp)
|
int atomisp_drvfs_init(struct atomisp_device *isp)
|
||||||
{
|
{
|
||||||
|
struct device_driver *drv = isp->dev->driver;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
iunit_debug.isp = isp;
|
iunit_debug.isp = isp;
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
#ifndef __ATOMISP_DRVFS_H__
|
#ifndef __ATOMISP_DRVFS_H__
|
||||||
#define __ATOMISP_DRVFS_H__
|
#define __ATOMISP_DRVFS_H__
|
||||||
|
|
||||||
int atomisp_drvfs_init(struct device_driver *drv, struct atomisp_device *isp);
|
int atomisp_drvfs_init(struct atomisp_device *isp);
|
||||||
void atomisp_drvfs_exit(void);
|
void atomisp_drvfs_exit(void);
|
||||||
|
|
||||||
#endif /* __ATOMISP_DRVFS_H__ */
|
#endif /* __ATOMISP_DRVFS_H__ */
|
||||||
|
|
|
@ -1840,7 +1840,7 @@ static int atomisp_pci_probe(struct pci_dev *dev,
|
||||||
isp->firmware = NULL;
|
isp->firmware = NULL;
|
||||||
isp->css_env.isp_css_fw.data = NULL;
|
isp->css_env.isp_css_fw.data = NULL;
|
||||||
|
|
||||||
atomisp_drvfs_init(&dev->driver->driver, isp);
|
atomisp_drvfs_init(isp);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue