aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/cdns3/cdns3-imx.c
diff options
context:
space:
mode:
authorStephen Boyd <[email protected]>2019-12-30 10:29:35 -0800
committerStephen Boyd <[email protected]>2020-01-04 23:08:17 -0800
commit9011f92622e5ef2d075f45e5fa818776d4feb8c0 (patch)
tree491b8873b07f2538f6800cf13b2a28bdc3255caf /drivers/usb/cdns3/cdns3-imx.c
parente42617b825f8073569da76dc4510bfa019b1c35a (diff)
clk: Use parent node pointer during registration if necessary
Sometimes clk drivers are attached to devices which are children of a parent device that is connected to a node in DT. This happens when devices are MFD-ish and the parent device driver mostly registers child devices to match against drivers placed in their respective subsystem directories like drivers/clk, drivers/regulator, etc. When the clk driver calls clk_register() with a device pointer, that struct device pointer won't have a device_node associated with it because it was created purely in software as a way to partition logic to a subsystem. This causes problems for the way we find parent clks for the clks registered by these child devices because we look at the registering device's device_node pointer to lookup 'clocks' and 'clock-names' properties. Let's use the parent device's device_node pointer if the registering device doesn't have a device_node but the parent does. This simplifies clk registration code by avoiding the need to assign some device_node to the device registering the clk. Cc: Bjorn Andersson <[email protected]> Reported-by: Niklas Cassel <[email protected]> Signed-off-by: Stephen Boyd <[email protected]> Link: https://lkml.kernel.org/r/[email protected] [[email protected]: Fixup kernel-doc notation] Reviewed-by: Niklas Cassel <[email protected]> Reviewed-by: Bjorn Andersson <[email protected]> Tested-by: Bjorn Andersson <[email protected]>
Diffstat (limited to 'drivers/usb/cdns3/cdns3-imx.c')
0 files changed, 0 insertions, 0 deletions