From: Florian Fainelli Date: Sun, 20 May 2018 15:56:30 +0000 (-0700) Subject: net: dsa: b53: Extend platform data to include DSA ports X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=bf3c592b9d78ab2768150c680de22ef99e6e3b32;p=openwrt%2Fstaging%2Fblogic.git net: dsa: b53: Extend platform data to include DSA ports The b53 driver already defines and internally uses platform data to let the glue drivers specify parameters such as the chip id. What we were missing was a way to tell the core DSA layer about the ports and their type. Place a dsa_chip_data structure at the beginning of b53_platform_data for dsa_register_switch() to access it. This does not require modifications to b53_common.c which will pass platform_data trough. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller --- diff --git a/include/linux/platform_data/b53.h b/include/linux/platform_data/b53.h index 69d279c0da96..8eaef2f2b691 100644 --- a/include/linux/platform_data/b53.h +++ b/include/linux/platform_data/b53.h @@ -20,8 +20,12 @@ #define __B53_H #include +#include struct b53_platform_data { + /* Must be first such that dsa_register_switch() can access it */ + struct dsa_chip_data cd; + u32 chip_id; u16 enabled_ports;