devsd: handle case where theres no ifc->enable() function
This commit is contained in:
parent
2b323158bd
commit
f59ef5e8e7
1 changed files with 2 additions and 2 deletions
|
@ -306,8 +306,8 @@ sdgetunit(SDev* sdev, int subno)
|
|||
unit->subno = subno;
|
||||
unit->dev = sdev;
|
||||
|
||||
if(sdev->enabled == 0 && sdev->ifc->enable)
|
||||
sdev->enabled = sdev->ifc->enable(sdev);
|
||||
if(sdev->enabled == 0)
|
||||
sdev->enabled = sdev->ifc->enable == nil || sdev->ifc->enable(sdev);
|
||||
|
||||
/*
|
||||
* No need to lock anything here as this is only
|
||||
|
|
Loading…
Reference in a new issue