]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: sja1105: Get rid of global declaration of struct ptp_clock_info
authorVladimir Oltean <olteanv@gmail.com>
Fri, 11 Oct 2019 23:18:13 +0000 (02:18 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 14 Oct 2019 23:45:40 +0000 (16:45 -0700)
commita4cdea7e79dd8fe1c8dc7d241d4abe38783642f6
tree9f6048f6344941316565f3201025ef75e389dd04
parent70e89f23603ca7fe759b7f0cf4fcb459932f9796
net: dsa: sja1105: Get rid of global declaration of struct ptp_clock_info

We need priv->ptp_caps to hold a structure and not just a pointer,
because we use container_of in the various PTP callbacks.

Therefore, the sja1105_ptp_caps structure declared in the global memory
of the driver serves no further purpose after copying it into
priv->ptp_caps.

So just populate priv->ptp_caps with the needed operations and remove
sja1105_ptp_caps.

Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/sja1105/sja1105_ptp.c