sh_eth: Use the platform device for memory allocation
Memory allocated for the MDIO bus with the devm_kzalloc() API is associated with the network device. While this will cause memory to be freed at the right time, it doesn't allow allocating memory before the network device is initialized. Replace the network device with the parent platform device for memory allocation to remove that dependency. This also improves consistency with the other devm_* calls in the driver that all use the platform device. Signed-off-by: NLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: NGeert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
Showing
想要评论请 注册 或 登录