Author: ian
Date: Sun Jul 30 00:00:30 2017
New Revision: 321709
URL: https://svnweb.freebsd.org/changeset/base/321709

Log:
  Fix building this driver on non-FDT platforms.

Modified:
  head/sys/dev/iicbus/ds1307.c

Modified: head/sys/dev/iicbus/ds1307.c
==============================================================================
--- head/sys/dev/iicbus/ds1307.c        Sat Jul 29 23:45:57 2017        
(r321708)
+++ head/sys/dev/iicbus/ds1307.c        Sun Jul 30 00:00:30 2017        
(r321709)
@@ -299,8 +299,10 @@ ds1307_attach(device_t dev)
        sc->enum_hook.ich_func = ds1307_start;
        sc->enum_hook.ich_arg = dev;
 
+#ifdef FDT
        if (ofw_bus_is_compatible(dev, "microchip,mcp7941x"))
                sc->sc_mcp7941x = 1;
+#endif
 
        /*
         * We have to wait until interrupts are enabled.  Usually I2C read
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to