diff mbox

[2/8,media] exynos4-is: Don't use i2c_client->driver

Message ID 1380444666-12019-3-git-send-email-lars@metafoo.de
State Accepted
Headers show

Commit Message

Lars-Peter Clausen Sept. 29, 2013, 8:51 a.m. UTC
The 'driver' field of the i2c_client struct is redundant and is going to be
removed. The results of the expressions 'client->driver.driver->field' and
'client->dev.driver->field' are identical, so replace all occurrences of the
former with the later.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
---
 drivers/media/platform/exynos4-is/media-dev.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Sylwester Nawrocki Sept. 29, 2013, 5:46 p.m. UTC | #1
On 09/29/2013 10:51 AM, Lars-Peter Clausen wrote:
> The 'driver' field of the i2c_client struct is redundant and is going to be
> removed. The results of the expressions 'client->driver.driver->field' and
> 'client->dev.driver->field' are identical, so replace all occurrences of the
> former with the later.
>
> Signed-off-by: Lars-Peter Clausen<lars@metafoo.de>
> Cc: Kyungmin Park<kyungmin.park@samsung.com>
> Cc: Sylwester Nawrocki<s.nawrocki@samsung.com>

Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Mauro Carvalho Chehab Oct. 17, 2013, 5:46 p.m. UTC | #2
Em Sun, 29 Sep 2013 10:51:00 +0200
Lars-Peter Clausen <lars@metafoo.de> escreveu:

> The 'driver' field of the i2c_client struct is redundant and is going to be
> removed. The results of the expressions 'client->driver.driver->field' and
> 'client->dev.driver->field' are identical, so replace all occurrences of the
> former with the later.
> 
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
> Cc: Kyungmin Park <kyungmin.park@samsung.com>
> Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>

Acked-by: Mauro Carvalho Chehab <m.chehab@samsung.com>

> ---
>  drivers/media/platform/exynos4-is/media-dev.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/media/platform/exynos4-is/media-dev.c b/drivers/media/platform/exynos4-is/media-dev.c
> index a835112..7a4ee4c 100644
> --- a/drivers/media/platform/exynos4-is/media-dev.c
> +++ b/drivers/media/platform/exynos4-is/media-dev.c
> @@ -411,8 +411,8 @@ static int fimc_md_of_add_sensor(struct fimc_md *fmd,
>  
>  	device_lock(&client->dev);
>  
> -	if (!client->driver ||
> -	    !try_module_get(client->driver->driver.owner)) {
> +	if (!client->dev.driver ||
> +	    !try_module_get(client->dev.driver->owner)) {
>  		ret = -EPROBE_DEFER;
>  		v4l2_info(&fmd->v4l2_dev, "No driver found for %s\n",
>  						node->full_name);
> @@ -442,7 +442,7 @@ static int fimc_md_of_add_sensor(struct fimc_md *fmd,
>  	fmd->num_sensors++;
>  
>  mod_put:
> -	module_put(client->driver->driver.owner);
> +	module_put(client->dev.driver->owner);
>  dev_put:
>  	device_unlock(&client->dev);
>  	put_device(&client->dev);
diff mbox

Patch

diff --git a/drivers/media/platform/exynos4-is/media-dev.c b/drivers/media/platform/exynos4-is/media-dev.c
index a835112..7a4ee4c 100644
--- a/drivers/media/platform/exynos4-is/media-dev.c
+++ b/drivers/media/platform/exynos4-is/media-dev.c
@@ -411,8 +411,8 @@  static int fimc_md_of_add_sensor(struct fimc_md *fmd,
 
 	device_lock(&client->dev);
 
-	if (!client->driver ||
-	    !try_module_get(client->driver->driver.owner)) {
+	if (!client->dev.driver ||
+	    !try_module_get(client->dev.driver->owner)) {
 		ret = -EPROBE_DEFER;
 		v4l2_info(&fmd->v4l2_dev, "No driver found for %s\n",
 						node->full_name);
@@ -442,7 +442,7 @@  static int fimc_md_of_add_sensor(struct fimc_md *fmd,
 	fmd->num_sensors++;
 
 mod_put:
-	module_put(client->driver->driver.owner);
+	module_put(client->dev.driver->owner);
 dev_put:
 	device_unlock(&client->dev);
 	put_device(&client->dev);