aboutsummaryrefslogtreecommitdiffstats
path: root/mpm/python/usrp_mpm/chips
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2017-11-28 13:43:46 -0800
committerMartin Braun <martin.braun@ettus.com>2017-12-22 15:05:07 -0800
commitee00c0384e6158766a12fe7806375433dddca7a2 (patch)
treec5fcef029a79f78a199296fff07cf6a021810d04 /mpm/python/usrp_mpm/chips
parent4205c7b3dafa6e2c9e0a23c12d4f3b02000c5f89 (diff)
downloaduhd-ee00c0384e6158766a12fe7806375433dddca7a2.tar.gz
uhd-ee00c0384e6158766a12fe7806375433dddca7a2.tar.bz2
uhd-ee00c0384e6158766a12fe7806375433dddca7a2.zip
mpm: mg: Move some class attributes to local scopes
The clock_synchronizer, jesdcore, and dboard_clk_control objects don't need to exist for the full lifetime of the Magnesium class. Having them around complicates management of UIO file descriptors.
Diffstat (limited to 'mpm/python/usrp_mpm/chips')
-rw-r--r--mpm/python/usrp_mpm/chips/lmk04828.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/mpm/python/usrp_mpm/chips/lmk04828.py b/mpm/python/usrp_mpm/chips/lmk04828.py
index 3d979e65e..2dc603da3 100644
--- a/mpm/python/usrp_mpm/chips/lmk04828.py
+++ b/mpm/python/usrp_mpm/chips/lmk04828.py
@@ -29,7 +29,9 @@ class LMK04828(object):
LMK_CHIP_ID = 6
def __init__(self, regs_iface, parent_log=None):
- self.log = parent_log.getChild("LMK04828") or get_logger("LMK04828")
+ self.log = \
+ parent_log.getChild("LMK04828") if parent_log is not None \
+ else get_logger("LMK04828")
self.regs_iface = regs_iface
assert hasattr(self.regs_iface, 'peek8')
assert hasattr(self.regs_iface, 'poke8')