Skip to content

Commit 0697fd9

Browse files
andy-shevmchehab
authored andcommitted
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 <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
1 parent 4f30713 commit 0697fd9

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

drivers/staging/media/atomisp/pci/atomisp_drvfs.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,9 @@ static void iunit_drvfs_remove_files(struct device_driver *drv)
185185
driver_remove_file(drv, &iunit_drvfs_attrs[i]);
186186
}
187187

188-
int atomisp_drvfs_init(struct device_driver *drv, struct atomisp_device *isp)
188+
int atomisp_drvfs_init(struct atomisp_device *isp)
189189
{
190+
struct device_driver *drv = isp->dev->driver;
190191
int ret;
191192

192193
iunit_debug.isp = isp;

drivers/staging/media/atomisp/pci/atomisp_drvfs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#ifndef __ATOMISP_DRVFS_H__
2020
#define __ATOMISP_DRVFS_H__
2121

22-
int atomisp_drvfs_init(struct device_driver *drv, struct atomisp_device *isp);
22+
int atomisp_drvfs_init(struct atomisp_device *isp);
2323
void atomisp_drvfs_exit(void);
2424

2525
#endif /* __ATOMISP_DRVFS_H__ */

drivers/staging/media/atomisp/pci/atomisp_v4l2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1840,7 +1840,7 @@ static int atomisp_pci_probe(struct pci_dev *dev,
18401840
isp->firmware = NULL;
18411841
isp->css_env.isp_css_fw.data = NULL;
18421842

1843-
atomisp_drvfs_init(&dev->driver->driver, isp);
1843+
atomisp_drvfs_init(isp);
18441844

18451845
return 0;
18461846

0 commit comments

Comments
 (0)