Re: [PATCH v2 08/17] PCI: dwc: Add host de-initialization callback

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, May 04, 2022 at 12:46:29AM +0300, Serge Semin wrote:
> Seeing the platform-specific DW PCIe host-initialization is performed from
> within the generic dw_pcie_host_init() method by means of the dedicated
> dw_pcie_ops.host_init() callback, there must be declared an antagonist
> which would perform the corresponding cleanups. Let's add such callback
> then. It will be called in the dw_pcie_host_deinit() method and in the
> cleanup-on-error path in the dw_pcie_host_init() function.

I'm not really a fan of .host_init() to begin with as it isn't really 
clear by the name when it is supposed to be called and what init to do. 
The drv probe -> dw_pcie_host_init -> drv .host_init() -> return to drv 
sequence isn't great either. I'd rather see more fine grained and well 
defined hooks. So I'm hesitant to add a host_deinit()...

Rob



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux