From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755096AbbE1WKc (ORCPT ); Thu, 28 May 2015 18:10:32 -0400 Received: from avon.wwwdotorg.org ([70.85.31.133]:46045 "EHLO avon.wwwdotorg.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755034AbbE1WK0 (ORCPT ); Thu, 28 May 2015 18:10:26 -0400 Message-ID: <55679250.1040708@wwwdotorg.org> Date: Thu, 28 May 2015 16:10:24 -0600 From: Stephen Warren User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: =?UTF-8?B?Tm9yYWxmIFRyw7hubmVz?= , Eric Anholt CC: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-rpi-kernel@lists.infradead.org Subject: Re: [PATCH 2/3 v4] ARM: bcm2835: Add the Raspberry Pi firmware driver References: <20150528114500.GP11677@x1> <1432837987-22861-1-git-send-email-eric@anholt.net> <55678BBC.5090507@tronnes.org> In-Reply-To: <55678BBC.5090507@tronnes.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/28/2015 03:42 PM, Noralf Trønnes wrote: > > Den 28.05.2015 20:33, skrev Eric Anholt: >> This gives us a function for making mailbox property channel requests >> of the firmware, which is most notable in that it will let us get and >> set clock rates. >> +static int rpi_firmware_remove(struct platform_device *pdev) >> +{ >> + struct rpi_firmware *fw = platform_get_drvdata(pdev); >> + >> + mbox_free_channel(fw->chan); > > I guess driver data has to be reset here: > platform_set_drvdata(pdev, NULL); The value of the drvdata is irrelevant before the device has probed, or after it has been removed. Hence, drivers should not manually clear drvdata. (Many drivers used to, but that code is being purged out).