mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2025-01-11 17:04:19 +01:00
Check if devclass exists for probed devices before
declaring the device 'alive'.
This commit is contained in:
parent
710c119cf7
commit
7d70baf7b2
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=41015
@ -23,7 +23,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: iicbus.c,v 1.2 1998/10/31 11:31:07 nsouch Exp $
|
||||
* $Id: iicbus.c,v 1.3 1998/11/07 14:33:46 nsouch Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -179,7 +179,9 @@ iicbus_attach(device_t dev)
|
||||
for (iicdev = iicbus_children; iicdev->iicd_name; iicdev++) {
|
||||
switch (iicdev->iicd_class) {
|
||||
case IICBUS_DEVICE_CLASS:
|
||||
if (iic_probe_device(dev, iicdev->iicd_addr))
|
||||
/* check if the devclass exists */
|
||||
if (devclass_find(iicdev->iicd_name) &&
|
||||
iic_probe_device(dev, iicdev->iicd_addr))
|
||||
iicdev->iicd_alive = 1;
|
||||
break;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user