Page MenuHomeFreeBSD

D37579.id113740.diff
No OneTemporary

D37579.id113740.diff

diff --git a/sys/dev/iicbus/rtc/rx8803.c b/sys/dev/iicbus/rtc/rx8803.c
--- a/sys/dev/iicbus/rtc/rx8803.c
+++ b/sys/dev/iicbus/rtc/rx8803.c
@@ -28,6 +28,8 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
+#include "opt_platform.h"
+
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/bus.h>
@@ -69,6 +71,11 @@
uint8_t year;
};
+static struct ofw_compat_data compat_data[] = {
+ {"epson,rx8803", 1},
+ {NULL, 0},
+};
+
static int rx8803_probe(device_t dev);
static int rx8803_attach(device_t dev);
static int rx8803_detach(device_t dev);
@@ -191,7 +198,10 @@
rx8803_probe(device_t dev)
{
- if (!ofw_bus_is_compatible(dev, "epson,rx8803"))
+ if (!ofw_bus_status_okay(dev))
+ return (ENXIO);
+
+ if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == 0)
return (ENXIO);
device_set_desc(dev, "Epson RX8803 Real Time Clock");
@@ -238,4 +248,6 @@
};
DRIVER_MODULE(rx8803, iicbus, rx8803_driver, NULL, NULL);
+MODULE_VERSION(rx8803, 1);
MODULE_DEPEND(rx8803, iicbus, IICBUS_MINVER, IICBUS_PREFVER, IICBUS_MAXVER);
+IICBUS_FDT_PNP_INFO(compat_data);

File Metadata

Mime Type
text/plain
Expires
Thu, Jan 16, 8:47 AM (15 h, 41 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15822946
Default Alt Text
D37579.id113740.diff (1 KB)

Event Timeline