diff options
author | Grygorii Strashko <grygorii.strashko@ti.com> | 2016-12-06 18:00:41 -0600 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-12-07 11:13:47 -0500 |
commit | 8a2c9a5ab4b933efd611af0a1313ec7892f5df1a (patch) | |
tree | 0b8fd9c3dd7556cd312744b4bbe3a52b51f61431 /kernel/delayacct.c | |
parent | 2a79df3ee9679dd1433ef9baa87ec395355eb0b4 (diff) |
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 'kernel/delayacct.c')
0 files changed, 0 insertions, 0 deletions