diff options
| author | Julien Stephan <[email protected]> | 2025-06-30 12:08:15 +0200 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2025-12-30 10:18:33 -0600 |
| commit | 5b2ee2c4a200961fa92ab1f2f2502ee41905257e (patch) | |
| tree | b336e30778e99269d1e81724e62a31133a37d96c /drivers | |
| parent | 17012e3068d047ad71460f039eeb0c3be63f82a0 (diff) | |
video: display: refactor display_read_timing to avoid code duplication
Commit 2dcf143398ad ("dm: video: Repurpose the 'displayport' uclass to 'display'")
left the display_read_edid() function unused by mistake.
Mark the function as static and reuse it within display_read_timing() to
avoid code duplication.
Signed-off-by: Julien Stephan <[email protected]>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/video/display-uclass.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/video/display-uclass.c b/drivers/video/display-uclass.c index 61a73e1bc2a..57e730538df 100644 --- a/drivers/video/display-uclass.c +++ b/drivers/video/display-uclass.c @@ -10,7 +10,7 @@ #include <edid.h> #include <errno.h> -int display_read_edid(struct udevice *dev, u8 *buf, int buf_size) +static int display_read_edid(struct udevice *dev, u8 *buf, int buf_size) { struct dm_display_ops *ops = display_get_ops(dev); @@ -59,9 +59,7 @@ int display_read_timing(struct udevice *dev, struct display_timing *timing) if (ops && ops->read_timing) return ops->read_timing(dev, timing); - if (!ops || !ops->read_edid) - return -ENOSYS; - ret = ops->read_edid(dev, buf, sizeof(buf)); + ret = display_read_edid(dev, buf, sizeof(buf)); if (ret < 0) return ret; |
