Re: [PATCH][RFCA] Sound: adding /proc/driver/{vendor}/{dev_pci}/ac97 entry for es1371 driver

Tommy Reynolds (reynolds@redhat.com)
Wed, 9 Jan 2002 10:06:12 -0600


--=.r)?Tca/pnqP0/n
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

Uttered "salvador" <salvador@inti.gov.ar>, spoke thus:

> Doubts:
> 1) This adds something like: /proc/driver/es1371/00:03.00/ac97 I took the
> idea from emu10k1.c module. My doubt is about the `:' it looks wrong in a
> file name, specially when that's usually used to separate file names/paths.
> Should we pass it by a small routine that converts : into something like _?

I wouldn't change it. In fact, Linux allows _any_ character except a NULL in a
filename, although POSIX doesn't. (Well, I wouldn't use a '/' in a filename
even if I escaped it out the wazoo!)

> 2) I used a buffer of fixed length as in other modules, but I don't feel
> really good doing it. What solutions are recommended? (if any)

The kernel stack is really small and doesn't grow, so a buffer allocated on the
stack could cause "load-dependent instability". Using a "vmalloc" and a "vfree"
is fast, cheap and easy.

-- 
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- + -- -- -- -- -- -- -- -- -- --
Tommy Reynolds                               | mailto: <reynolds@redhat.com>
Red Hat, Inc., Embedded Development Services | Phone:  +1.256.704.9286
307 Wynn Drive NW, Huntsville, AL 35805 USA  | FAX:    +1.256.837.3839
Senior Software Developer                    | Mobile: +1.919.641.2923

--=.r)?Tca/pnqP0/n Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux)

iEYEARECAAYFAjw8angACgkQWEn3bOOMcupuJQCaAxZvRfqn6McFx+ruovh9nNjm GIQAn1XKe+BAlkcGJS2IsK1iX6+ryqmE =Rqj2 -----END PGP SIGNATURE-----

--=.r)?Tca/pnqP0/n--

- 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/