Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src



On Sun, Aug 20, 2006 at 07:06:58AM +0000, Iain Hibbert wrote:
> 
> Module Name:  src
> Committed By: plunky
> Date:         Sun Aug 20 07:06:58 UTC 2006
> 
> Modified Files:
>       src/share/man/man4: btdev.4
>       src/sys/arch/i386/conf: GENERIC GENERIC_LAPTOP
>       src/sys/dev/bluetooth: btdev.c
> 
> Log Message:
> Make btdev default count explicit

Hard-coded limits are ugly.  Why don't you simply do the
config_attach_pseudo in btdevopen?

That way, you don't need sc_busy anymore;  the mere fact that there is
a softc indicates that it's being used, and then you config_detach in
btdevclose.  The next step is to have a cloning char device, so that
you only have one device node so you don't have to create btdev0,
btdev1, etc.  You'd only have /dev/btdev and userland wouldn't have to
know before hand which unit is used.

I don't have any bluetooth stuff, so I can't test but the code is rather
easy.

-- 
Quentin Garnier - cube%cubidou.net@localhost - cube%NetBSD.org@localhost
"When I find the controls, I'll go where I like, I'll know where I want
to be, but maybe for now I'll stay right here on a silent sea."
KT Tunstall, Silent Sea, Eye to the Telescope, 2004.

Attachment: pgpKK1JR97_rb.pgp
Description: PGP signature



Home | Main Index | Thread Index | Old Index