From patchwork Sat Apr 4 10:30:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 237158 List-Id: U-Boot discussion From: marek.vasut at gmail.com (Marek Vasut) Date: Sat, 4 Apr 2020 12:30:09 +0200 Subject: [PATCH] net: Fix warning when including netdev.h on DM systems Message-ID: <20200404103009.329877-1-marek.vasut+renesas@gmail.com> If the DM_ETH is enabled and netdev.h is included somewhere, the struct eth_device may not be defined, yet it is used in the header file as an argument to fecmxc_register_mii_postcall. Add forward declaration to remove the warning. Signed-off-by: Marek Vasut Cc: Joe Hershberger --- include/netdev.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/netdev.h b/include/netdev.h index 68a3fceab6..f2d21c45d0 100644 --- a/include/netdev.h +++ b/include/netdev.h @@ -125,6 +125,7 @@ int fec_probe(bd_t *bd, int dev_id, uint32_t base_addr, /* * Allow FEC to fine-tune MII configuration on boards which require this. */ +struct eth_device; int fecmxc_register_mii_postcall(struct eth_device *dev, int (*cb)(int)); #endif