diff --git a/sys/dev/i2c/i2c.c b/sys/dev/i2c/i2c.c index 98e2b531dda7..6fa74c9f272e 100644 --- a/sys/dev/i2c/i2c.c +++ b/sys/dev/i2c/i2c.c @@ -1,4 +1,4 @@ -/* $NetBSD: i2c.c,v 1.25 2010/03/01 17:35:21 njoly Exp $ */ +/* $NetBSD: i2c.c,v 1.26 2011/07/31 15:58:25 jmcneill Exp $ */ /* * Copyright (c) 2003 Wasabi Systems, Inc. @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: i2c.c,v 1.25 2010/03/01 17:35:21 njoly Exp $"); +__KERNEL_RCSID(0, "$NetBSD: i2c.c,v 1.26 2011/07/31 15:58:25 jmcneill Exp $"); #include #include @@ -118,6 +118,13 @@ iic_search(device_t parent, cfdata_t cf, const int *ldesc, void *aux) return (0); } +static int +iic_rescan(device_t self, const char *ifattr, const int *locators) +{ + config_search_ia(iic_search, self, ifattr, NULL); + return 0; +} + static int iic_match(device_t parent, cfdata_t cf, void *aux) { @@ -275,7 +282,7 @@ iic_attach(device_t parent, device_t self, void *aux) * Attach all i2c devices described in the kernel * configuration file. */ - config_search_ia(iic_search, self, "iic", NULL); + iic_rescan(self, "iic", NULL); } } @@ -429,5 +436,5 @@ iic_compat_match(struct i2c_attach_args *ia, const char ** compats) } -CFATTACH_DECL_NEW(iic, sizeof(struct iic_softc), - iic_match, iic_attach, NULL, NULL); +CFATTACH_DECL2_NEW(iic, sizeof(struct iic_softc), + iic_match, iic_attach, NULL, NULL, iic_rescan, NULL);