lkml.org 
[lkml]   [2022]   [May]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 08/17] PCI: dwc: Add host de-initialization callback
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

\
 
 \ /
  Last update: 2022-05-16 23:09    [W:0.270 / U:0.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site