Message ID | 20200517190139.740249-16-sam@ravnborg.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | backlight updates | expand |
On Sun, May 17, 2020 at 09:01:38PM +0200, Sam Ravnborg wrote: > There are no external users of of_find_backlight_by_node(). > Make it static so we keep it that way. > > v2: > - drop EXPORT of of_find_backlight_by_node > > Signed-off-by: Sam Ravnborg <sam@ravnborg.org> > Cc: Lee Jones <lee.jones@linaro.org> > Cc: Daniel Thompson <daniel.thompson@linaro.org> > Cc: Jingoo Han <jingoohan1@gmail.com> Assuming the 0day-ci comments are because some of the patches have already been sucked up in a different tree then: Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Daniel. > --- > drivers/video/backlight/backlight.c | 23 +++++++++-------------- > include/linux/backlight.h | 10 ---------- > 2 files changed, 9 insertions(+), 24 deletions(-) > > diff --git a/drivers/video/backlight/backlight.c b/drivers/video/backlight/backlight.c > index 7f3eecaf8317..3fa29330a820 100644 > --- a/drivers/video/backlight/backlight.c > +++ b/drivers/video/backlight/backlight.c > @@ -627,19 +627,9 @@ static int of_parent_match(struct device *dev, const void *data) > return dev->parent && dev->parent->of_node == data; > } > > -/** > - * of_find_backlight_by_node() - find backlight device by device-tree node > - * @node: device-tree node of the backlight device > - * > - * Returns a pointer to the backlight device corresponding to the given DT > - * node or NULL if no such backlight device exists or if the device hasn't > - * been probed yet. > - * > - * This function obtains a reference on the backlight device and it is the > - * caller's responsibility to drop the reference by calling put_device() on > - * the backlight device's .dev field. > - */ > -struct backlight_device *of_find_backlight_by_node(struct device_node *node) > +/* Find backlight device by device-tree node */ > +static struct backlight_device * > +of_find_backlight_by_node(struct device_node *node) > { > struct device *dev; > > @@ -647,7 +637,12 @@ struct backlight_device *of_find_backlight_by_node(struct device_node *node) > > return dev ? to_backlight_device(dev) : NULL; > } > -EXPORT_SYMBOL(of_find_backlight_by_node); > +#else > +static struct backlight_device * > +of_find_backlight_by_node(struct device_node *node) > +{ > + return NULL; > +} > #endif > > static struct backlight_device *of_find_backlight(struct device *dev) > diff --git a/include/linux/backlight.h b/include/linux/backlight.h > index d92e523650ec..1e29ab43f4f6 100644 > --- a/include/linux/backlight.h > +++ b/include/linux/backlight.h > @@ -473,16 +473,6 @@ static inline void * bl_get_data(struct backlight_device *bl_dev) > return dev_get_drvdata(&bl_dev->dev); > } > > -#ifdef CONFIG_OF > -struct backlight_device *of_find_backlight_by_node(struct device_node *node); > -#else > -static inline struct backlight_device * > -of_find_backlight_by_node(struct device_node *node) > -{ > - return NULL; > -} > -#endif > - > #if IS_ENABLED(CONFIG_BACKLIGHT_CLASS_DEVICE) > struct backlight_device *devm_of_find_backlight(struct device *dev); > #else > -- > 2.25.1 >
On Mon, May 18, 2020 at 05:56:48PM +0100, Daniel Thompson wrote: > On Sun, May 17, 2020 at 09:01:38PM +0200, Sam Ravnborg wrote: > > There are no external users of of_find_backlight_by_node(). > > Make it static so we keep it that way. > > > > v2: > > - drop EXPORT of of_find_backlight_by_node > > > > Signed-off-by: Sam Ravnborg <sam@ravnborg.org> > > Cc: Lee Jones <lee.jones@linaro.org> > > Cc: Daniel Thompson <daniel.thompson@linaro.org> > > Cc: Jingoo Han <jingoohan1@gmail.com> > > Assuming the 0day-ci comments are because some of the patches have > already been sucked up in a different tree then: Correct. For now only drm-misc-next have no users of of_find_backlight_by_node() which is why the other trees failed. > Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Thanks for all your reviews! I will shortly (within a few days) address the comments and send out a v3. Is is correct that I assume you or Lee or Jingoo will apply the patches to a backlight tree somewhere when they are ready? If you have a tree you use for backlight patches I can base v3 on that, given that I get a link and have access to pull from it. Sam
On Mon, May 18, 2020 at 08:12:27PM +0200, Sam Ravnborg wrote: > On Mon, May 18, 2020 at 05:56:48PM +0100, Daniel Thompson wrote: > > On Sun, May 17, 2020 at 09:01:38PM +0200, Sam Ravnborg wrote: > > > There are no external users of of_find_backlight_by_node(). > > > Make it static so we keep it that way. > > > > > > v2: > > > - drop EXPORT of of_find_backlight_by_node > > > > > > Signed-off-by: Sam Ravnborg <sam@ravnborg.org> > > > Cc: Lee Jones <lee.jones@linaro.org> > > > Cc: Daniel Thompson <daniel.thompson@linaro.org> > > > Cc: Jingoo Han <jingoohan1@gmail.com> > > > > Assuming the 0day-ci comments are because some of the patches have > > already been sucked up in a different tree then: > Correct. For now only drm-misc-next have no users of > of_find_backlight_by_node() which is why the other trees failed. > > > > Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> > Thanks for all your reviews! > I will shortly (within a few days) address the comments and send out a v3. > > Is is correct that I assume you or Lee or Jingoo will apply the patches > to a backlight tree somewhere when they are ready? > If you have a tree you use for backlight patches I can base v3 on that, > given that I get a link and have access to pull from it. Absent holidays and the like, Lee usually does that actual patch hoovering. Daniel.
diff --git a/drivers/video/backlight/backlight.c b/drivers/video/backlight/backlight.c index 7f3eecaf8317..3fa29330a820 100644 --- a/drivers/video/backlight/backlight.c +++ b/drivers/video/backlight/backlight.c @@ -627,19 +627,9 @@ static int of_parent_match(struct device *dev, const void *data) return dev->parent && dev->parent->of_node == data; } -/** - * of_find_backlight_by_node() - find backlight device by device-tree node - * @node: device-tree node of the backlight device - * - * Returns a pointer to the backlight device corresponding to the given DT - * node or NULL if no such backlight device exists or if the device hasn't - * been probed yet. - * - * This function obtains a reference on the backlight device and it is the - * caller's responsibility to drop the reference by calling put_device() on - * the backlight device's .dev field. - */ -struct backlight_device *of_find_backlight_by_node(struct device_node *node) +/* Find backlight device by device-tree node */ +static struct backlight_device * +of_find_backlight_by_node(struct device_node *node) { struct device *dev; @@ -647,7 +637,12 @@ struct backlight_device *of_find_backlight_by_node(struct device_node *node) return dev ? to_backlight_device(dev) : NULL; } -EXPORT_SYMBOL(of_find_backlight_by_node); +#else +static struct backlight_device * +of_find_backlight_by_node(struct device_node *node) +{ + return NULL; +} #endif static struct backlight_device *of_find_backlight(struct device *dev) diff --git a/include/linux/backlight.h b/include/linux/backlight.h index d92e523650ec..1e29ab43f4f6 100644 --- a/include/linux/backlight.h +++ b/include/linux/backlight.h @@ -473,16 +473,6 @@ static inline void * bl_get_data(struct backlight_device *bl_dev) return dev_get_drvdata(&bl_dev->dev); } -#ifdef CONFIG_OF -struct backlight_device *of_find_backlight_by_node(struct device_node *node); -#else -static inline struct backlight_device * -of_find_backlight_by_node(struct device_node *node) -{ - return NULL; -} -#endif - #if IS_ENABLED(CONFIG_BACKLIGHT_CLASS_DEVICE) struct backlight_device *devm_of_find_backlight(struct device *dev); #else
There are no external users of of_find_backlight_by_node(). Make it static so we keep it that way. v2: - drop EXPORT of of_find_backlight_by_node Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Lee Jones <lee.jones@linaro.org> Cc: Daniel Thompson <daniel.thompson@linaro.org> Cc: Jingoo Han <jingoohan1@gmail.com> --- drivers/video/backlight/backlight.c | 23 +++++++++-------------- include/linux/backlight.h | 10 ---------- 2 files changed, 9 insertions(+), 24 deletions(-)