mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-05-05 20:56:12 +02:00
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 <jstephan@baylibre.com>
This commit is contained in:
parent
17012e3068
commit
5b2ee2c4a2
@ -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;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user