From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754977AbbE1VjQ (ORCPT ); Thu, 28 May 2015 17:39:16 -0400 Received: from smtp.domeneshop.no ([194.63.252.55]:58395 "EHLO smtp.domeneshop.no" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754625AbbE1VjO (ORCPT ); Thu, 28 May 2015 17:39:14 -0400 Message-ID: <55678AFC.6020404@tronnes.org> Date: Thu, 28 May 2015 23:39:08 +0200 From: =?windows-1252?Q?Noralf_Tr=F8nnes?= User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Stephen Warren , Eric Anholt CC: devicetree@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.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> <5567886F.5080108@wwwdotorg.org> In-Reply-To: <5567886F.5080108@wwwdotorg.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Den 28.05.2015 23:28, skrev Stephen Warren: > On 05/28/2015 12:33 PM, Eric Anholt wrote: >> 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. ... >> +int rpi_firmware_property_list(struct device_node *of_node, >> + void *data, size_t tag_size) >> +{ >> + struct platform_device *pdev = of_find_device_by_node(of_node); > I would expect the of_node -> pdev mapping to happen at client device > probe time. Simplest for this driver would be if the > client-probe-time-mapping function returned the "struct rpi_firmware" > and the client passed that to this function. What if the firmware driver/device is removed or reloaded? In that case the client has an invalid pointer. It wouldn't know about the change.