tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

re: introduce device_is_attached()



> I want to introduce a new function to sys/devices.h:
> 
> bool device_is_attached(device_t parent, cfdata_t cf);

this doesn't seem to match what the function actually does, which
is answer the question "does this parent bus have a child attached
with the same driver name as in cf->cf_name".

that doesn't handle the more interesting cases i can think of such
as "does this pci bus have something at device 4 function 1", which
is a question i'd expect "device_is_attached{,_p}()" to answer.  ie,
it is limited to fake busses AFAICT.


i don't think we should adopt this function in sys/device.h.


.mrg.


Home | Main Index | Thread Index | Old Index