Re: [PATCH][ATM] add reference counting to atm_dev

chas williams (chas@locutus.cmf.nrl.navy.mil)
Thu, 15 May 2003 10:32:05 -0400


In message <20030515052041.GA5995@kroah.com>,Greg KH writes:
>It's not really bothering me, just wondering when it will go away (I see
>it when building one of the USB ATM drivers...)

the MOD_* functions in the speedtch driver don't need to be there.
since 2.3.something (if i remember correctly) the reference counting
has been handled by the upper layer (ala fops_get/fops_put). the
following patch removes these extra bits:

--- linux-2.5.68/drivers/usb/misc/speedtch.c.000 Thu May 15 10:29:20 2003
+++ linux-2.5.68/drivers/usb/misc/speedtch.c Thu May 15 10:29:32 2003
@@ -939,19 +939,15 @@
return -EAGAIN;
}

- MOD_INC_USE_COUNT;
-
down (&instance->serialize); /* vs self, udsl_atm_close */

if (udsl_find_vcc (instance, vpi, vci)) {
up (&instance->serialize);
- MOD_DEC_USE_COUNT;
return -EADDRINUSE;
}

if (!(new = kmalloc (sizeof (struct udsl_vcc_data), GFP_KERNEL))) {
up (&instance->serialize);
- MOD_DEC_USE_COUNT;
return -ENOMEM;
}

@@ -1021,8 +1017,6 @@

up (&instance->serialize);

- MOD_DEC_USE_COUNT;
-
dbg ("udsl_atm_close successful");
}

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/