From patchwork Mon May 13 09:19:21 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 2557301 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 D0342DF2E5 for ; Mon, 13 May 2013 09:32:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751652Ab3EMJco (ORCPT ); Mon, 13 May 2013 05:32:44 -0400 Received: from mail-pd0-f173.google.com ([209.85.192.173]:37083 "EHLO mail-pd0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750992Ab3EMJcn (ORCPT ); Mon, 13 May 2013 05:32:43 -0400 Received: by mail-pd0-f173.google.com with SMTP id v10so4290252pde.4 for ; Mon, 13 May 2013 02:32:43 -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:in-reply-to :references:x-gm-message-state; bh=0YN9wYIaXknyl2mFIX1xAIPQsyv5vyzsFQgZihnDFmc=; b=jVEZLOXsCsoq7m1rYjk/VRtmnBvvEJZlnyhJdaZ8f5G3oXSA1cRwVdrwH4JJI055Hw lCvakH1TuWlMIqI+DXptc9SBoDIWS3i76JSz8NTgNhulY7kEqZkqPNa1FJq/i5tE3WYY OHvYE2cqlHsIcpRsVrLbGewV9t/GmGWQNnBeuo0xS1fF2d7Wp1BufR8FxPCEnCejmh9w y5yZqgLD4xnCO9mCAvznuj3IMgkC5iFsGzK2sNqEv1Qz4oxZ2oD+GvyaumcOjqSigQy3 IGQFaWBwapcRuKDf/JO8jhqRcEFGA43jQGjWgkxIpvI6Ht7KY+yX4RnDQGhUNc3YeNWm 6eAg== X-Received: by 10.69.3.65 with SMTP id bu1mr28288136pbd.107.1368437563365; Mon, 13 May 2013 02:32:43 -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.40 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 13 May 2013 02:32:42 -0700 (PDT) From: Sachin Kamat To: linux-media@vger.kernel.org Cc: g.liakhovetski@gmx.de, sachin.kamat@linaro.org Subject: [PATCH 2/2] [media] soc_camera_platform: Remove redundant platform_set_drvdata() Date: Mon, 13 May 2013 14:49:21 +0530 Message-Id: <1368436761-12183-2-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1368436761-12183-1-git-send-email-sachin.kamat@linaro.org> References: <1368436761-12183-1-git-send-email-sachin.kamat@linaro.org> X-Gm-Message-State: ALoCoQnLPAnAgYUw/gdEXFUNu0TOP4oHQb+HDgIA7A7+ZXdGA+vu7s1RovBdZAKAMc0bJLRK/CV9 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 --- .../platform/soc_camera/soc_camera_platform.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/drivers/media/platform/soc_camera/soc_camera_platform.c b/drivers/media/platform/soc_camera/soc_camera_platform.c index 1b7a88c..bf0bdd0 100644 --- a/drivers/media/platform/soc_camera/soc_camera_platform.c +++ b/drivers/media/platform/soc_camera/soc_camera_platform.c @@ -166,14 +166,8 @@ static int soc_camera_platform_probe(struct platform_device *pdev) strncpy(priv->subdev.name, dev_name(&pdev->dev), V4L2_SUBDEV_NAME_SIZE); ret = v4l2_device_register_subdev(&ici->v4l2_dev, &priv->subdev); - if (ret) - goto evdrs; return ret; - -evdrs: - platform_set_drvdata(pdev, NULL); - return ret; } static int soc_camera_platform_remove(struct platform_device *pdev) @@ -183,7 +177,6 @@ static int soc_camera_platform_remove(struct platform_device *pdev) p->icd->control = NULL; v4l2_device_unregister_subdev(&priv->subdev); - platform_set_drvdata(pdev, NULL); return 0; }