We don't use the "bus" array or the "bus_num" variable which store the number of elements in the array. The only user was removed in 5d6abf379d ('staging: vme: make match() driver specific to improve non-VME64x support'). Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx> diff --git a/drivers/staging/vme/devices/vme_user.c b/drivers/staging/vme/devices/vme_user.c index e24a6f9..be198c0 100644 --- a/drivers/staging/vme/devices/vme_user.c +++ b/drivers/staging/vme/devices/vme_user.c @@ -43,9 +43,6 @@ static DEFINE_MUTEX(vme_user_mutex); static const char driver_name[] = "vme_user"; -static int bus[VME_USER_BUS_MAX]; -static unsigned int bus_num; - /* Currently Documentation/devices.txt defines the following for VME: * * 221 char VME bus @@ -628,41 +625,15 @@ static struct vme_driver vme_user_driver = { static int __init vme_user_init(void) { - int retval = 0; - printk(KERN_INFO "VME User Space Access Driver\n"); - if (bus_num == 0) { - printk(KERN_ERR "%s: No cards, skipping registration\n", - driver_name); - retval = -ENODEV; - goto err_nocard; - } - - /* Let's start by supporting one bus, we can support more than one - * in future revisions if that ever becomes necessary. - */ - if (bus_num > VME_USER_BUS_MAX) { - printk(KERN_ERR "%s: Driver only able to handle %d buses\n", - driver_name, VME_USER_BUS_MAX); - bus_num = VME_USER_BUS_MAX; - } - /* * Here we just register the maximum number of devices we can and * leave vme_user_match() to allow only 1 to go through to probe(). * This way, if we later want to allow multiple user access devices, * we just change the code in vme_user_match(). */ - retval = vme_register_driver(&vme_user_driver, VME_MAX_SLOTS); - if (retval != 0) - goto err_reg; - - return retval; - -err_reg: -err_nocard: - return retval; + return vme_register_driver(&vme_user_driver, VME_MAX_SLOTS); } static int vme_user_match(struct vme_dev *vdev) @@ -888,10 +859,6 @@ static void __exit vme_user_exit(void) vme_unregister_driver(&vme_user_driver); } - -MODULE_PARM_DESC(bus, "Enumeration of VMEbus to which the driver is connected"); -module_param_array(bus, int, &bus_num, 0); - MODULE_DESCRIPTION("VME User Space Access Driver"); MODULE_AUTHOR("Martyn Welch <martyn.welch@xxxxxx"); MODULE_LICENSE("GPL"); _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/devel