mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 09:10:28 +00:00
ds1307: restore hints-based configuration on FDT systems
Fall-through to non-FDT probe code if no matching device node is found.
While here, fix indentation of the switch statement.
Also, make the device description for the hints-based attachment the
same as for FDT attachment.
Fixes: 2486b446db
ds1307: add support for the EPSON RX-8035SA I2C RTC
This commit is contained in:
parent
4dedcb1bb5
commit
34694f3da7
|
@ -225,10 +225,8 @@ ds1307_probe(device_t dev)
|
|||
return (ENXIO);
|
||||
|
||||
compat = ofw_bus_search_compatible(dev, ds1307_compat_data);
|
||||
if (compat->ocd_str == NULL)
|
||||
return (ENXIO);
|
||||
|
||||
switch(compat->ocd_data) {
|
||||
if (compat->ocd_str != NULL) {
|
||||
switch(compat->ocd_data) {
|
||||
case TYPE_DS1307:
|
||||
device_set_desc(dev, "Dallas DS1307");
|
||||
break;
|
||||
|
@ -244,11 +242,12 @@ ds1307_probe(device_t dev)
|
|||
default:
|
||||
device_set_desc(dev, "Unknown DS1307-like device");
|
||||
break;
|
||||
}
|
||||
return (BUS_PROBE_DEFAULT);
|
||||
}
|
||||
return (BUS_PROBE_DEFAULT);
|
||||
#endif
|
||||
|
||||
device_set_desc(dev, "Maxim DS1307 RTC");
|
||||
device_set_desc(dev, "Maxim DS1307");
|
||||
return (BUS_PROBE_NOWILDCARD);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue