From d10a32e4d5fdc4688e899f054f240db7d3f62777 Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Sat, 29 Aug 2009 11:04:57 +0000 Subject: submatch functions used with config_found_sm() are required to invoke the driver's ca_match function. (only offender in the whole tree) ok deraadt@ --- sys/dev/gpio/gpio.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'sys/dev') diff --git a/sys/dev/gpio/gpio.c b/sys/dev/gpio/gpio.c index 30ad168f3ad..cb5374e18e5 100644 --- a/sys/dev/gpio/gpio.c +++ b/sys/dev/gpio/gpio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gpio.c,v 1.10 2008/11/26 15:04:42 mbalmer Exp $ */ +/* $OpenBSD: gpio.c,v 1.11 2009/08/29 11:04:56 miod Exp $ */ /* * Copyright (c) 2008 Marc Balmer @@ -80,7 +80,10 @@ gpio_submatch(struct device *parent, void *match, void *aux) struct cfdata *cf = match; struct gpio_attach_args *ga = aux; - return (strcmp(ga->ga_dvname, cf->cf_driver->cd_name) == 0); + if (strcmp(ga->ga_dvname, cf->cf_driver->cd_name) != 0) + return (0); + + return ((*cf->cf_attach->ca_match)(parent, match, aux)); } void -- cgit v1.2.3