History

backlight: backlight: Drop backlight_put()

There are no external users of backlight_put(). Drop it and open code the two users in backlight.c.

Sam Ravnborg committed 6 years ago

Commit 0f6a3251 parent 51d53e52 files · +5 −12Browse files

Unified · Split

2 files
  1. drivers/video/backlight/backlight.c +5 −2
  2. include/linux/backlight.h +0 −10
drivers/video/backlight/backlight.c+5−2
@@ -718,7 +718,10 @@ EXPORT_SYMBOL(of_find_backlight); · 717 unmodified lines
718718
719719 static void devm_backlight_release(void *data)
720720 {
721− backlight_put(data);
721+ struct backlight_device *bd = data;
722+
723+ if (bd)
724+ put_device(&bd->dev);
722725 }
723726
724727 /**
@@ -746,7 +749,7 @@ struct backlight_device *devm_of_find_backlight(struct device *dev) · 21 unmodified lines
746749 return bd;
747750 ret = devm_add_action(dev, devm_backlight_release, bd);
748751 if (ret) {
749− backlight_put(bd);
752+ put_device(&bd->dev);
750753 return ERR_PTR(ret);
751754 }
752755 return bd;
include/linux/backlight.h+0−10
@@ -388,16 +388,6 @@ static inline int backlight_disable(struct backlight_device *bd) · 387 unmodified lines
388388 return backlight_update_status(bd);
389389 }
390390
391−/**
392− * backlight_put - Drop backlight reference
393− * @bd: the backlight device to put
394− */
395−static inline void backlight_put(struct backlight_device *bd)
396−{
397− if (bd)
398− put_device(&bd->dev);
399−}
400−
401391 /**
402392 * backlight_is_blank - Return true if display is expected to be blank
403393 * @bd: the backlight device

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t