From patchwork Thu Sep 26 10:35:54 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 2947831 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id BDCFBBFF05 for ; Thu, 26 Sep 2013 10:36:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9CF1F201CD for ; Thu, 26 Sep 2013 10:36:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 64F49200EB for ; Thu, 26 Sep 2013 10:36:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756669Ab3IZKgR (ORCPT ); Thu, 26 Sep 2013 06:36:17 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:46779 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756666Ab3IZKgP (ORCPT ); Thu, 26 Sep 2013 06:36:15 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id r8QAZvec021742; Thu, 26 Sep 2013 05:35:57 -0500 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id r8QAZv91032697; Thu, 26 Sep 2013 05:35:57 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.2.342.3; Thu, 26 Sep 2013 05:35:56 -0500 Received: from [172.24.68.8] (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id r8QAZsH7027040; Thu, 26 Sep 2013 05:35:55 -0500 Message-ID: <52440E0A.8080609@ti.com> Date: Thu, 26 Sep 2013 13:35:54 +0300 From: Tomi Valkeinen User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0 MIME-Version: 1.0 To: Sachin Kamat CC: , , Nicolas Ferre Subject: Re: [PATCH 01/15] video: atmel_lcdfb: Remove redundant dev_set_drvdata References: <1379658744-17113-1-git-send-email-sachin.kamat@linaro.org> <1379658744-17113-2-git-send-email-sachin.kamat@linaro.org> In-Reply-To: <1379658744-17113-2-git-send-email-sachin.kamat@linaro.org> X-Enigmail-Version: 1.5.2 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-9.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_TVD_MIME_EPI, UNPARSEABLE_RELAY autolearn=unavailable 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 On 20/09/13 09:32, Sachin Kamat wrote: > Driver core sets driver data to NULL upon failure or remove. > > Signed-off-by: Sachin Kamat > Cc: Nicolas Ferre > --- > drivers/video/atmel_lcdfb.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c > index 34e934d..70052e7 100644 > --- a/drivers/video/atmel_lcdfb.c > +++ b/drivers/video/atmel_lcdfb.c > @@ -1318,7 +1318,6 @@ static int __init atmel_lcdfb_probe(struct platform_device *pdev) > return 0; > > reset_drvdata: > - dev_set_drvdata(dev, NULL); > fb_dealloc_cmap(&info->cmap); > unregister_irqs: > cancel_work_sync(&sinfo->task); > @@ -1379,7 +1378,6 @@ static int __exit atmel_lcdfb_remove(struct platform_device *pdev) > atmel_lcdfb_free_video_memory(sinfo); > } > > - dev_set_drvdata(dev, NULL); > framebuffer_release(info); > > return 0; > I had to modify this one as follows. Are you fine with it? commit 8d84d1223dbbaceb5cbf25b597e48a59c36b8c91 Author: Sachin Kamat Date: Fri Sep 20 12:02:10 2013 +0530 video: atmel_lcdfb: Remove redundant dev_set_drvdata Driver core sets driver data to NULL upon failure or remove. Signed-off-by: Sachin Kamat Cc: Nicolas Ferre Signed-off-by: Tomi Valkeinen diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c index df05550..3f7d6dc 100644 --- a/drivers/video/atmel_lcdfb.c +++ b/drivers/video/atmel_lcdfb.c @@ -1089,7 +1089,7 @@ static int __init atmel_lcdfb_probe(struct platform_device *pdev) ret = register_framebuffer(info); if (ret < 0) { dev_err(dev, "failed to register framebuffer device: %d\n", ret); - goto reset_drvdata; + goto free_cmap; } /* add selected videomode to modelist */ @@ -1105,8 +1105,6 @@ static int __init atmel_lcdfb_probe(struct platform_device *pdev) return 0; -reset_drvdata: - dev_set_drvdata(dev, NULL); free_cmap: fb_dealloc_cmap(&info->cmap); unregister_irqs: @@ -1167,7 +1165,6 @@ static int __exit atmel_lcdfb_remove(struct platform_device *pdev) atmel_lcdfb_free_video_memory(sinfo); } - dev_set_drvdata(dev, NULL); framebuffer_release(info); return 0;