On Tue, Mar 27, 2018 at 3:11 PM, Moritz Fischer
<moritz.fisc...@ettus.com> wrote:
> On Tue, Mar 27, 2018 at 12:59 PM, Alan Tull <at...@kernel.org> wrote:
>> Change fpga_mgr_register to not set or use drvdata.
>>
>> Change the register/unregister function parameters to take the mgr
>> struct:
>> * int fpga_mgr_register(struct fpga_manager *mgr);
>> * void fpga_mgr_unregister(struct fpga_manager *mgr);
>>
>> Change the drivers that call fpga_mgr_register to alloc the struct
>> fpga_manager (using devm_kzalloc) and partly fill it, adding name,
>> ops, parent device, and priv.
>>
>> The rationale is that setting drvdata is fine for DT based devices
>> that will have one manager, bridge, or region per platform device.
>> However PCIe based devices may have multiple FPGA mgr/bridge/regions
>> under one PCIe device.  Without these changes, the PCIe solution has
>> to create an extra device for each child mgr/bridge/region to hold
>> drvdata.
>>
>> Signed-off-by: Alan Tull <at...@kernel.org>
>> Reported-by: Jiuyue Ma <majiu...@huawei.com>
> Acked-by: Moritz Fischer <m...@kernel.org>

Thanks Moritz!

Alan

Reply via email to