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

limit link to 0-3

This commit is contained in:
Ralph Metzler 2018-05-02 15:45:00 +02:00
parent c831ccfc9e
commit 5b86ac7627

View File

@ -62,7 +62,7 @@ u32 ddbreadl(struct ddb *dev, u32 adr)
{ {
if (unlikely(adr & 0xf0000000)) { if (unlikely(adr & 0xf0000000)) {
unsigned long flags; unsigned long flags;
u32 val, l = (adr >> DDB_LINK_SHIFT); u32 val, l = (adr >> DDB_LINK_SHIFT) & 3;
struct ddb_link *link = &dev->link[l]; struct ddb_link *link = &dev->link[l];
spin_lock_irqsave(&link->lock, flags); spin_lock_irqsave(&link->lock, flags);