From patchwork Mon May 13 09:19:20 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 2557291 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 07B33DF2E5 for ; Mon, 13 May 2013 09:32:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752791Ab3EMJcl (ORCPT ); Mon, 13 May 2013 05:32:41 -0400 Received: from mail-da0-f49.google.com ([209.85.210.49]:37279 "EHLO mail-da0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750992Ab3EMJck (ORCPT ); Mon, 13 May 2013 05:32:40 -0400 Received: by mail-da0-f49.google.com with SMTP id p5so764717dak.8 for ; Mon, 13 May 2013 02:32:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=W2NzJP1mYoDUpVQ8AC6fov9h3gLkokePQGsxUIffePc=; b=n1yVdU6EhC1Bh80yv/hkPPE7HcoiZuq9gTt94JMjL/NP7W1Cy7UI4wAWhLbAUueNlP iy2Vddv7X+DRLapYbdccOhIy5ulpn+uL6DG3BFryomuYjXsWu3FLR3paamDB+jPOK3OF P6PyF7oLUjl9fE7q1LHCtg5HiX0h3dw+AUTWREvkg6IjyixXpx0b2Re9daq9r+C4PZDS PXsC2n8OJZ06yEpVip23vDL9TM+6FHmiIIf7aqGmz+AXLLr2OcMt+IVriUx/fEky+MNU D4UI4ugXUnfM/6r99IKLzGxQDhvL2UsyuNwgUtSZQc73pTPHbf6E8kBEkYYNRYsJrxdx DlKw== X-Received: by 10.68.201.39 with SMTP id jx7mr6107715pbc.186.1368437560260; Mon, 13 May 2013 02:32:40 -0700 (PDT) Received: from linaro.sisodomain.com ([115.113.119.130]) by mx.google.com with ESMTPSA id az5sm13367614pbc.18.2013.05.13.02.32.38 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 13 May 2013 02:32:39 -0700 (PDT) From: Sachin Kamat To: linux-media@vger.kernel.org Cc: g.liakhovetski@gmx.de, sachin.kamat@linaro.org Subject: [PATCH 1/2] [media] soc_camera/sh_mobile_csi2: Remove redundant platform_set_drvdata() Date: Mon, 13 May 2013 14:49:20 +0530 Message-Id: <1368436761-12183-1-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.9.5 X-Gm-Message-State: ALoCoQn3yBkk5g0khSqAhQQHWgBeR97LYUFMQ/BUliKFOsVw3cKP3mmkjif68yum3DCu3MrBIamx Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Commit 0998d06310 (device-core: Ensure drvdata = NULL when no driver is bound) removes the need to set driver data field to NULL. Signed-off-by: Sachin Kamat --- drivers/media/platform/soc_camera/sh_mobile_csi2.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/media/platform/soc_camera/sh_mobile_csi2.c b/drivers/media/platform/soc_camera/sh_mobile_csi2.c index 09cb4fc..13a1f8f 100644 --- a/drivers/media/platform/soc_camera/sh_mobile_csi2.c +++ b/drivers/media/platform/soc_camera/sh_mobile_csi2.c @@ -340,18 +340,13 @@ static int sh_csi2_probe(struct platform_device *pdev) ret = v4l2_device_register_subdev(pdata->v4l2_dev, &priv->subdev); dev_dbg(&pdev->dev, "%s(%p): ret(register_subdev) = %d\n", __func__, priv, ret); if (ret < 0) - goto esdreg; + return ret; pm_runtime_enable(&pdev->dev); dev_dbg(&pdev->dev, "CSI2 probed.\n"); return 0; - -esdreg: - platform_set_drvdata(pdev, NULL); - - return ret; } static int sh_csi2_remove(struct platform_device *pdev) @@ -360,7 +355,6 @@ static int sh_csi2_remove(struct platform_device *pdev) v4l2_device_unregister_subdev(&priv->subdev); pm_runtime_disable(&pdev->dev); - platform_set_drvdata(pdev, NULL); return 0; }