summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/myricom
diff options
context:
space:
mode:
authorGrygorii Strashko2016-12-07 01:00:41 +0100
committerDavid S. Miller2016-12-07 17:13:47 +0100
commit8a2c9a5ab4b933efd611af0a1313ec7892f5df1a (patch)
tree0b8fd9c3dd7556cd312744b4bbe3a52b51f61431 /drivers/net/ethernet/myricom
parentnet: ethernet: ti: cpts: drop excessive writes to CTRL and INT_EN regs (diff)
downloadkernel-qcow2-linux-8a2c9a5ab4b933efd611af0a1313ec7892f5df1a.tar.gz
kernel-qcow2-linux-8a2c9a5ab4b933efd611af0a1313ec7892f5df1a.tar.xz
kernel-qcow2-linux-8a2c9a5ab4b933efd611af0a1313ec7892f5df1a.zip
net: ethernet: ti: cpts: rework initialization/deinitialization
The current implementation CPTS initialization and deinitialization (represented by cpts_register/unregister()) does too many static initialization from .ndo_open(), which is reasonable to do once at probe time instead, and also require caller to allocate memory for struct cpts, which is internal for CPTS driver in general. This patch splits CPTS initialization and deinitialization on two parts: - static initializtion cpts_create()/cpts_release() which expected to be executed when parent driver is probed/removed; - dynamic part cpts_register/unregister() which expected to be executed when network device is opened/closed. As result, current code of CPTS parent driver - CPSW - will be simplified (and it also will allow simplify adding support for Keystone 2 devices in the future), plus more initialization errors will be catched earlier. In addition, this change allows to clean up cpts.h for the case when CPTS is disabled. Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/myricom')
0 files changed, 0 insertions, 0 deletions