Skip to content

Commit b6539a1

Browse files
sravnborgLee Jones
authored andcommitted
backlight: backlight: Make of_find_backlight static
There are no external users of of_find_backlight, as they have all changed to use the managed version. Make of_find_backlight static to prevent new external users. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
1 parent 0f6a325 commit b6539a1

2 files changed

Lines changed: 1 addition & 23 deletions

File tree

drivers/video/backlight/backlight.c

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -673,22 +673,7 @@ struct backlight_device *of_find_backlight_by_node(struct device_node *node)
673673
EXPORT_SYMBOL(of_find_backlight_by_node);
674674
#endif
675675

676-
/**
677-
* of_find_backlight - Get backlight device
678-
* @dev: Device
679-
*
680-
* This function looks for a property named 'backlight' on the DT node
681-
* connected to @dev and looks up the backlight device.
682-
*
683-
* Call backlight_put() to drop the reference on the backlight device.
684-
*
685-
* Returns:
686-
* A pointer to the backlight device if found.
687-
* Error pointer -EPROBE_DEFER if the DT property is set, but no backlight
688-
* device is found.
689-
* NULL if there's no backlight property.
690-
*/
691-
struct backlight_device *of_find_backlight(struct device *dev)
676+
static struct backlight_device *of_find_backlight(struct device *dev)
692677
{
693678
struct backlight_device *bd = NULL;
694679
struct device_node *np;
@@ -714,7 +699,6 @@ struct backlight_device *of_find_backlight(struct device *dev)
714699

715700
return bd;
716701
}
717-
EXPORT_SYMBOL(of_find_backlight);
718702

719703
static void devm_backlight_release(void *data)
720704
{

include/linux/backlight.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -477,14 +477,8 @@ of_find_backlight_by_node(struct device_node *node)
477477
#endif
478478

479479
#if IS_ENABLED(CONFIG_BACKLIGHT_CLASS_DEVICE)
480-
struct backlight_device *of_find_backlight(struct device *dev);
481480
struct backlight_device *devm_of_find_backlight(struct device *dev);
482481
#else
483-
static inline struct backlight_device *of_find_backlight(struct device *dev)
484-
{
485-
return NULL;
486-
}
487-
488482
static inline struct backlight_device *
489483
devm_of_find_backlight(struct device *dev)
490484
{

0 commit comments

Comments
 (0)