Since this driver's plat-data already contains a PXE context, use that.
Drop the priv-data. Use the extlinux_info which is in there, as well.

Signed-off-by: Simon Glass <s...@chromium.org>
---

(no changes since v1)

 boot/bootmeth_pxe.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/boot/bootmeth_pxe.c b/boot/bootmeth_pxe.c
index 6b3cb3c4b91..a9608edcef9 100644
--- a/boot/bootmeth_pxe.c
+++ b/boot/bootmeth_pxe.c
@@ -140,7 +140,7 @@ static int extlinux_pxe_read_file(struct udevice *dev, 
struct bootflow *bflow,
 static int extlinux_pxe_boot(struct udevice *dev, struct bootflow *bflow)
 {
        struct extlinux_plat *plat = dev_get_plat(dev);
-       struct pxe_context *ctx = dev_get_priv(dev);
+       struct pxe_context *ctx = &plat->ctx;
        ulong addr;
        int ret;
 
@@ -188,6 +188,5 @@ U_BOOT_DRIVER(bootmeth_zpxe) = {
        .of_match       = extlinux_bootmeth_pxe_ids,
        .ops            = &extlinux_bootmeth_pxe_ops,
        .bind           = extlinux_bootmeth_pxe_bind,
-       .priv_auto      = sizeof(struct pxe_context),
        .plat_auto      = sizeof(struct extlinux_plat)
 };
-- 
2.34.1

Reply via email to