mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
ds1307: allow configuration via hints on FDT-based systems
On-board devices should be configured via the FDT and overlays. Hints are primarily useful for external and temporarily attached devices. Adding hints is much easier and faster than writing and compiling an overlay. MFC after: 2 weeks
This commit is contained in:
parent
53b356f17a
commit
27645265c4
1 changed files with 6 additions and 11 deletions
|
|
@ -216,18 +216,13 @@ ds1307_probe(device_t dev)
|
|||
return (ENXIO);
|
||||
|
||||
compat = ofw_bus_search_compatible(dev, ds1307_compat_data);
|
||||
|
||||
if (compat->ocd_str == NULL)
|
||||
return (ENXIO);
|
||||
|
||||
device_set_desc(dev, (const char *)compat->ocd_data);
|
||||
|
||||
return (BUS_PROBE_DEFAULT);
|
||||
#else
|
||||
device_set_desc(dev, "Maxim DS1307 RTC");
|
||||
|
||||
return (BUS_PROBE_NOWILDCARD);
|
||||
if (compat->ocd_str != NULL) {
|
||||
device_set_desc(dev, (const char *)compat->ocd_data);
|
||||
return (BUS_PROBE_DEFAULT);
|
||||
}
|
||||
#endif
|
||||
device_set_desc(dev, "Maxim DS1307 RTC");
|
||||
return (BUS_PROBE_NOWILDCARD);
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
|
|||
Loading…
Reference in a new issue