All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Mauro Carvalho Chehab <mchehab@kernel.org>,
	linux-media@vger.kernel.org,
	Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: [PATCH v2 04/15] media: atomisp: don't pass struct device_driver as parameter
Date: Fri, 26 Jun 2020 15:19:14 +0300	[thread overview]
Message-ID: <20200626121925.14365-5-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <20200626121925.14365-1-andriy.shevchenko@linux.intel.com>

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>
---
 drivers/staging/media/atomisp/pci/atomisp_drvfs.c | 3 ++-
 drivers/staging/media/atomisp/pci/atomisp_drvfs.h | 2 +-
 drivers/staging/media/atomisp/pci/atomisp_v4l2.c  | 2 +-
 3 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/media/atomisp/pci/atomisp_drvfs.c b/drivers/staging/media/atomisp/pci/atomisp_drvfs.c
index fe0e2bfde27f..3711df111fbf 100644
--- a/drivers/staging/media/atomisp/pci/atomisp_drvfs.c
+++ b/drivers/staging/media/atomisp/pci/atomisp_drvfs.c
@@ -185,8 +185,9 @@ static void iunit_drvfs_remove_files(struct device_driver *drv)
 		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;
 
 	iunit_debug.isp = isp;
diff --git a/drivers/staging/media/atomisp/pci/atomisp_drvfs.h b/drivers/staging/media/atomisp/pci/atomisp_drvfs.h
index 4911037231fb..8f4cc722b881 100644
--- a/drivers/staging/media/atomisp/pci/atomisp_drvfs.h
+++ b/drivers/staging/media/atomisp/pci/atomisp_drvfs.h
@@ -19,7 +19,7 @@
 #ifndef	__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);
 
 #endif /* __ATOMISP_DRVFS_H__ */
diff --git a/drivers/staging/media/atomisp/pci/atomisp_v4l2.c b/drivers/staging/media/atomisp/pci/atomisp_v4l2.c
index fa07cbaf0422..c6996b1f228b 100644
--- a/drivers/staging/media/atomisp/pci/atomisp_v4l2.c
+++ b/drivers/staging/media/atomisp/pci/atomisp_v4l2.c
@@ -1838,7 +1838,7 @@ static int atomisp_pci_probe(struct pci_dev *dev,
 	isp->firmware = NULL;
 	isp->css_env.isp_css_fw.data = NULL;
 
-	atomisp_drvfs_init(&dev->driver->driver, isp);
+	atomisp_drvfs_init(isp);
 
 	return 0;
 
-- 
2.27.0


  parent reply	other threads:[~2020-06-26 12:19 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-26 12:19 [PATCH v2 00/15] media: atomisp: Clean ups and fixes to make it load on Baytrail Andy Shevchenko
2020-06-26 12:19 ` [PATCH v2 01/15] media: atomisp: Replace last use of Intel MID APIs Andy Shevchenko
2020-06-26 12:19 ` [PATCH v2 02/15] media: atomisp: move CCK endpoint address to generic header Andy Shevchenko
2020-06-26 12:19 ` [PATCH v2 03/15] media: atomisp: Use proper APIs to find I²C client device by ACPI HID Andy Shevchenko
2020-06-26 12:19 ` Andy Shevchenko [this message]
2020-06-26 12:19 ` [PATCH v2 05/15] media: atomisp: Get rid of struct pci_dev in struct atomisp_device Andy Shevchenko
2020-06-26 12:19 ` [PATCH v2 06/15] media: atomisp: Unify pdev to be pointer to struct pci_device Andy Shevchenko
2020-06-26 12:19 ` [PATCH v2 07/15] media: atomisp: Replace direct access to MMIO with proper helpers Andy Shevchenko
2020-06-26 12:19 ` [PATCH v2 08/15] media: atomisp: Drop global atomisp_dev variable (easy cases) Andy Shevchenko
2020-06-26 12:19 ` [PATCH v2 09/15] media: atomisp: make platform data more readable Andy Shevchenko
2020-06-26 12:19 ` [PATCH v2 10/15] media: atomisp: Don't try to parse unexpected ACPI object type Andy Shevchenko
2020-06-26 12:19 ` [PATCH v2 11/15] media: atomisp: Make pointer to PMIC client global Andy Shevchenko
2020-06-26 12:19 ` [PATCH v2 12/15] media: atomisp: Refactor PMIC detection to a separate function Andy Shevchenko
2020-06-26 12:19 ` [PATCH v2 13/15] media: atomisp: Provide Gmin subdev as parameter to gmin_subdev_add() Andy Shevchenko
2020-06-26 12:19 ` [PATCH v2 14/15] media: atomisp: Get rid of ugly and leaky ACPI handling in gmin_subdev_add() Andy Shevchenko
2020-06-26 12:19 ` [PATCH v2 15/15] media: atomisp: Deduplicate return ret in gmin_i2c_write() Andy Shevchenko
2020-06-26 13:29 ` [PATCH v2 00/15] media: atomisp: Clean ups and fixes to make it load on Baytrail Mauro Carvalho Chehab
2020-06-26 14:01   ` Mauro Carvalho Chehab
2020-06-29 10:53     ` Andy Shevchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200626121925.14365-5-andriy.shevchenko@linux.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.