From patchwork Sun Sep 29 08:51:00 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lars-Peter Clausen X-Patchwork-Id: 2960021 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 0184A9F1BF for ; Sun, 29 Sep 2013 08:51:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3CC1A200E5 for ; Sun, 29 Sep 2013 08:51:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 70F71200DE for ; Sun, 29 Sep 2013 08:51:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754587Ab3I2Itg (ORCPT ); Sun, 29 Sep 2013 04:49:36 -0400 Received: from smtp-out-220.synserver.de ([212.40.185.220]:1457 "EHLO smtp-out-220.synserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754384Ab3I2Itc (ORCPT ); Sun, 29 Sep 2013 04:49:32 -0400 Received: (qmail 2071 invoked by uid 0); 29 Sep 2013 08:49:29 -0000 X-SynServer-TrustedSrc: 1 X-SynServer-AuthUser: lars@metafoo.de X-SynServer-PPID: 1782 Received: from ppp-88-217-66-240.dynamic.mnet-online.de (HELO lars-adi-laptop.fritz.box) [88.217.66.240] by 217.119.54.77 with SMTP; 29 Sep 2013 08:49:26 -0000 From: Lars-Peter Clausen To: Wolfram Sang , David Airlie , Mauro Carvalho Chehab , Jaroslav Kysela , Takashi Iwai , Liam Girdwood , Mark Brown Cc: linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-media@vger.kernel.org, alsa-devel@alsa-project.org, Lars-Peter Clausen , Kyungmin Park , Sylwester Nawrocki Subject: [PATCH 2/8] [media] exynos4-is: Don't use i2c_client->driver Date: Sun, 29 Sep 2013 10:51:00 +0200 Message-Id: <1380444666-12019-3-git-send-email-lars@metafoo.de> X-Mailer: git-send-email 1.8.0 In-Reply-To: <1380444666-12019-1-git-send-email-lars@metafoo.de> References: <1380444666-12019-1-git-send-email-lars@metafoo.de> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,KHOP_BIG_TO_CC, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Cc: Kyungmin Park Cc: Sylwester Nawrocki Acked-by: Sylwester Nawrocki Acked-by: Mauro Carvalho Chehab --- 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);