1
0
mirror of https://github.com/DigitalDevices/dddvb.git synced 2023-10-10 13:37:43 +02:00

check if link exists

This commit is contained in:
none 2020-03-31 16:38:49 +02:00
parent 8c950053a7
commit 02329a7d55

View File

@ -65,6 +65,8 @@ u32 ddbreadl(struct ddb *dev, u32 adr)
u32 val, l = (adr >> DDB_LINK_SHIFT) & 3;
struct ddb_link *link = &dev->link[l];
if (!link->regs)
return 0;
spin_lock_irqsave(&link->lock, flags);
gtlw(link);
ddblwritel0(link, adr & 0xfffc, link->regs + 0x14);
@ -84,6 +86,8 @@ void ddbwritel(struct ddb *dev, u32 val, u32 adr)
u32 l = (adr >> DDB_LINK_SHIFT);
struct ddb_link *link = &dev->link[l];
if (!link->regs)
return;
spin_lock_irqsave(&link->lock, flags);
gtlw(link);
ddblwritel0(link, 0xf0000 | (adr & 0xfffc), link->regs + 0x14);