Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751742Ab3HUJpj (ORCPT ); Wed, 21 Aug 2013 05:45:39 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:40091 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751541Ab3HUJph (ORCPT ); Wed, 21 Aug 2013 05:45:37 -0400 X-AuditID: cbfee68e-b7f276d000002279-b3-52148c3f080d From: Jingoo Han To: "'Vinod Koul'" Cc: "'Dan Williams'" , linux-kernel@vger.kernel.org, "'Simon Horman'" , "'Guennadi Liakhovetski'" , "'Jingoo Han'" Subject: [PATCH] dma: sh: remove unnecessary platform_set_drvdata() Date: Wed, 21 Aug 2013 18:45:35 +0900 Message-id: <002801ce9e53$2f63b1e0$8e2b15a0$%han@samsung.com> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-index: Ac6eUy9M4qfpJa1qQgCgMBLck+jjLQ== Content-language: ko X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrBIsWRmVeSWpSXmKPExsVy+t8zA137HpEgg+Utehab+x+wWbzfOI/J 4sLbD2wWlxdeYrW4vGsOm8XLvv0sDmweE5vfsXt8+BjnsXjPSyaPvi2rGD3m/PzG4vF5k1wA WxSXTUpqTmZZapG+XQJXxvI7/5gLGnkqevadYW9gbOHqYuTkkBAwkZi9s5cFwhaTuHBvPVsX IxeHkMAyRolfvedZYIpOnehmhUhMZ5RYfKeTGcL5xShxevZTsCo2ATWJL18Os3cxcnCICKhL LL0uA1LDLHCMUeL4hsVsIDXCAs4S1/b/YgWpYRFQlZjxMgAkzCtgK7FxTScThC0o8WPyPbCR zAJaEut3HmeCsOUlNq95ywzSKgE0/tFfXZCwiICexMoTx9kgSkQk9r14xwiyVkLgGrvEs9/n GUESLAICEt8mH2KB6JWV2HSAGeIvSYmDK26wTGAUm4Vk8ywkm2ch2TwLyYo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8kM G0r5Iz4d93PKLvVjyV+6s/LYRdnVh749b7G8qLrwFPN2SeVdH7dKC7ZdSfAq4z+cZHDQ+/m/ 5+Uz14s0uEr0TfwZrV0mutlwZdctk+CDjWEqL/eLTnFJ0vi9ZZurJVvomvTWjMRlB+bXtNTG e16u4rv8T+P2s5vaCvV5B97Pt/+Q91iJpTgj0VCLuag4EQBPrL/jOAMAAA== DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1727 Lines: 60 The driver core clears the driver data to NULL after device_release or on probe failure. Thus, it is not needed to manually clear the device driver data to NULL. Signed-off-by: Jingoo Han --- drivers/dma/sh/shdma.c | 3 --- drivers/dma/sh/sudmac.c | 2 -- 2 files changed, 5 deletions(-) diff --git a/drivers/dma/sh/shdma.c b/drivers/dma/sh/shdma.c index 211e2f1..208de0f 100644 --- a/drivers/dma/sh/shdma.c +++ b/drivers/dma/sh/shdma.c @@ -873,7 +873,6 @@ rst_err: pm_runtime_put(&pdev->dev); pm_runtime_disable(&pdev->dev); - platform_set_drvdata(pdev, NULL); shdma_cleanup(&shdev->shdma_dev); eshdma: if (dmars) @@ -917,8 +916,6 @@ static int sh_dmae_remove(struct platform_device *pdev) iounmap(shdev->dmars); iounmap(shdev->chan_reg); - platform_set_drvdata(pdev, NULL); - synchronize_rcu(); kfree(shdev); diff --git a/drivers/dma/sh/sudmac.c b/drivers/dma/sh/sudmac.c index c494417..23fffc8 100644 --- a/drivers/dma/sh/sudmac.c +++ b/drivers/dma/sh/sudmac.c @@ -393,7 +393,6 @@ static int sudmac_probe(struct platform_device *pdev) chan_probe_err: sudmac_chan_remove(su_dev); - platform_set_drvdata(pdev, NULL); shdma_cleanup(&su_dev->shdma_dev); return err; @@ -407,7 +406,6 @@ static int sudmac_remove(struct platform_device *pdev) dma_async_device_unregister(dma_dev); sudmac_chan_remove(su_dev); shdma_cleanup(&su_dev->shdma_dev); - platform_set_drvdata(pdev, NULL); return 0; } -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/