From 719548ef66175bdea228f7b377a4edc259d16ab2 Mon Sep 17 00:00:00 2001 From: Ian Abbott Date: Tue, 9 Dec 2008 11:07:22 +0000 Subject: [PATCH] Staging: comedi: Make comedi_auto_config() succeed when auto-configuration disabled. Otherwise it would not work properly. From: Ian Abbott Cc: Frank Mori Hess Cc: David Schleef Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/staging/comedi/drivers.c b/drivers/staging/comedi/drivers.c index 7322eb8e2ba9..e14aef2a197a 100644 --- a/drivers/staging/comedi/drivers.c +++ b/drivers/staging/comedi/drivers.c @@ -799,8 +799,10 @@ int comedi_auto_config(struct device *hardware_device, const char *board_name, c int retval; unsigned *private_data = NULL; - if (!comedi_autoconfig) - return -ENODEV; + if (!comedi_autoconfig) { + dev_set_drvdata(hardware_device, NULL); + return 0; + } minor = comedi_alloc_board_minor(hardware_device); if(minor < 0) return minor; -- 2.20.1