diff mbox series

[2/2] of: export of_device_add()

Message ID 20221103141233.20179-2-m.szyprowski@samsung.com (mailing list archive)
State New, archived
Headers show
Series [1/2] usb: dwc3: exynos: force PHY control from XHCI HCD | expand

Commit Message

Marek Szyprowski Nov. 3, 2022, 2:12 p.m. UTC
Export of_device_add() function to let DWC3 driver (Exynos variant) to
instantiate DWC3 core device from the respective child OF-node with a
custom, addtional properties added.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
 drivers/of/device.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Greg KH Nov. 3, 2022, 2:40 p.m. UTC | #1
On Thu, Nov 03, 2022 at 03:12:33PM +0100, Marek Szyprowski wrote:
> Export of_device_add() function to let DWC3 driver (Exynos variant) to
> instantiate DWC3 core device from the respective child OF-node with a
> custom, addtional properties added.
> 
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
>  drivers/of/device.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/of/device.c b/drivers/of/device.c
> index 8cefe5a7d04e..bc60c9b6863c 100644
> --- a/drivers/of/device.c
> +++ b/drivers/of/device.c
> @@ -52,6 +52,7 @@ int of_device_add(struct platform_device *ofdev)
>  
>  	return device_add(&ofdev->dev);
>  }
> +EXPORT_SYMBOL(of_device_add);

I do not see any user of this symbol after this patch (no 3/2?)

So why is it needed?  No driver should ever be calling this function
directly.

thanks,

greg k-h
Johan Hovold Nov. 3, 2022, 2:42 p.m. UTC | #2
On Thu, Nov 03, 2022 at 11:40:12PM +0900, Greg Kroah-Hartman wrote:
> On Thu, Nov 03, 2022 at 03:12:33PM +0100, Marek Szyprowski wrote:
> > Export of_device_add() function to let DWC3 driver (Exynos variant) to
> > instantiate DWC3 core device from the respective child OF-node with a
> > custom, addtional properties added.
> > 
> > Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> > ---
> >  drivers/of/device.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/drivers/of/device.c b/drivers/of/device.c
> > index 8cefe5a7d04e..bc60c9b6863c 100644
> > --- a/drivers/of/device.c
> > +++ b/drivers/of/device.c
> > @@ -52,6 +52,7 @@ int of_device_add(struct platform_device *ofdev)
> >  
> >  	return device_add(&ofdev->dev);
> >  }
> > +EXPORT_SYMBOL(of_device_add);
> 
> I do not see any user of this symbol after this patch (no 3/2?)
> 
> So why is it needed?  No driver should ever be calling this function
> directly.

It was used by 1/2 so this would have broken bisectability.

Johan
diff mbox series

Patch

diff --git a/drivers/of/device.c b/drivers/of/device.c
index 8cefe5a7d04e..bc60c9b6863c 100644
--- a/drivers/of/device.c
+++ b/drivers/of/device.c
@@ -52,6 +52,7 @@  int of_device_add(struct platform_device *ofdev)
 
 	return device_add(&ofdev->dev);
 }
+EXPORT_SYMBOL(of_device_add);
 
 static void
 of_dma_set_restricted_buffer(struct device *dev, struct device_node *np)