Skip to content

Commit

Permalink
adi: adrf5720: Fix device finding
Browse files Browse the repository at this point in the history
Signed-off-by: Dragos Bogdan <[email protected]>
  • Loading branch information
dbogdan committed Feb 16, 2023
1 parent 021881c commit 647efa7
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions adi/adrf5720.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,8 @@ class adrf5720(attribute, context_manager):
def __init__(self, uri="", device_name=""):
context_manager.__init__(self, uri, self._device_name)

compatible_parts = [
"adrf5720",
"adrf5730",
"adrf5731",
]

self._ctrl = None

for device in self._ctx.devices:
if device.name in [device_name] + compatible_parts:
self._ctrl = device
break
self._device_name = device_name
self._ctrl = self._ctx.find_device(self._device_name)

# Raise an exception if the device isn't found
if not self._ctrl:
Expand Down

0 comments on commit 647efa7

Please sign in to comment.