From mboxrd@z Thu Jan 1 00:00:00 1970 From: Boris BREZILLON Subject: Re: [PATCH v5 05/11] drm: add Atmel HLCDC Display Controller support Date: Mon, 22 Sep 2014 11:15:12 +0200 Message-ID: <20140922111512.52cb6d1b@bbrezillon> References: <1410165822-16868-1-git-send-email-boris.brezillon@free-electrons.com> <1410165822-16868-6-git-send-email-boris.brezillon@free-electrons.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: linux-pwm-owner@vger.kernel.org To: David Herrmann Cc: David Airlie , "dri-devel@lists.freedesktop.org" , Samuel Ortiz , Lee Jones , Thierry Reding , linux-pwm@vger.kernel.org, Nicolas Ferre , Jean-Christophe Plagniol-Villard , Alexandre Belloni , Andrew Victor , Mark Rutland , devicetree@vger.kernel.org, Pawel Moll , Ludovic Desroches , Ian Campbell , Rob Herring , Laurent Pinchart , Bo Shen , Kumar Gala List-Id: devicetree@vger.kernel.org Hi David, On Fri, 19 Sep 2014 15:10:02 +0200 David Herrmann wrote: > Hi > > On Mon, Sep 8, 2014 at 10:43 AM, Boris BREZILLON > wrote: > [snip] > > +static int atmel_hlcdc_dc_drm_probe(struct platform_device *pdev) > > +{ > > + int ret; > > + > > + ret = dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(32)); > > + if (ret) > > + return ret; > > + > > + ret = drm_platform_init(&atmel_hlcdc_dc_driver, pdev); > > + if (ret) > > + return ret; > > Please avoid any use of drm_platform_*(). Use drm_dev_alloc(), > drm_dev_register() directly. See my response on > "[PATCH v3 1/5] drm/rockchip: Add basic drm driver": > for details. Also have a look at the tegra driver how to do it. > > > + > > + return 0; > > +} > > + > > +static int atmel_hlcdc_dc_drm_remove(struct platform_device *pdev) > > +{ > > + drm_put_dev(platform_get_drvdata(pdev)); > > Same here: please use dev_dev_*() directly: > > drm_dev_unregister(ddev); > drm_dev_unref(ddev); Sure, I'll change that. Thanks, Boris -- Boris Brezillon, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com