> @@ -230,6 +231,13 @@ static int dsa_switch_setup_one(struct dsa_switch *ds,
> struct device *parent)
> for (i = 0; i < DSA_MAX_PORTS; i++) {
> char *name;
>
> + dp[i] = devm_kzalloc(parent, sizeof(*dp), GFP_KERNEL);
> + if (dp[i] == NULL)
> +
> @@ -230,6 +231,13 @@ static int dsa_switch_setup_one(struct dsa_switch *ds,
> struct device *parent)
> for (i = 0; i < DSA_MAX_PORTS; i++) {
> char *name;
>
> + dp[i] = devm_kzalloc(parent, sizeof(*dp), GFP_KERNEL);
> + if (dp[i] == NULL)
> +
Introduce a new dsa_port structure, used to store port-centric
information, such as a pointer to its DSA switch and its port number.
It will later contains further data, such as its bridge device.
This is a first step towards implementing cross-chip port operations.
Signed-off-by: Vivien Didelot
Introduce a new dsa_port structure, used to store port-centric
information, such as a pointer to its DSA switch and its port number.
It will later contains further data, such as its bridge device.
This is a first step towards implementing cross-chip port operations.
Signed-off-by: Vivien Didelot
4 matches
Mail list logo