tech-kern archive

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

Re: btuart and SOCKET Bluetooth CF

On Thu, 18 Feb 2010, KIYOHARA Takashi wrote:

> > (btw, no comma is permitted on final enum values)
> This is because of convenient for the addition in the future.  The diff
> becomes smaller.  ;-)

Yes, except C89 and C++ do not permit that, so gcc (also lint?) makes
complaints about it. It is not "reasonable" alas.

> > +static int
> > +btuart_dtl_probe(dev_t dev)
> > +{
> > +#if NCOM > 0
>    :
> > +#endif
> > +   return 0;
> > +}
> >
> > I really dislike this function, it depends on internals of com driver [btw
> > COMUNIT(x) would be (minor(x) & COMUNIT_MASK)] and pcmcia and using this
> > method prevents a soft emulator and/or needs kernel modifications to
> > handle any new device.
> We are expecting the minor number to be obtained.  In my opinion, it is
> necessary to open() the device node for that.  Therefore, only minor()
> is called.  It thinks dependence on the structure of pcmcia(4) for other
> way not to exist though it is very regrettable.  ;-<

I don't understand why you want to make it complex in this way?

in the beginning, the admin must recognise that they have a Nokia DTL
device, eg:

# btattach dtl /dev/tty03 19200

btattach will perform the device specific initialisation, and set the line
to use the protocol that is required.  Why do you desire to forget this
knowledge of the protocol type and require the btuart.c to depend on
possibly unrelated parts of the kernel to re-discover it later?

I find it makes no sense to do it that way, and furthermore the method
will cause problems for any user who wishes to use the Nokia DTL protocol
in a way that is not previously defined by you.


Home | Main Index | Thread Index | Old Index