Mailing List archive

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

[linux-dvb] Re: Proposal for new frontend architecture]



Hi,

On 24.09.2004 16:55, Gerd Knorr wrote:
Not sure all the ID stuff was a good idea in the first place.  We have
both name and id in all the structs which is sort of redundant.  ->name
is nicer as it is human readable: you can printk it, put it into sysfs
and so on.  The places where ->id is used are not performance critical,
so using ->name instead and drop ->id should be ok.  But thats another
story ...
One of the two can be killed, yes. If preference goes to strings, that's fine with me.

(b) It isn't typesafe.

Exactly.  Thats the main issue I see with the approach, we have *again*
a void ptr where we'll pass random stuff, and I suspect the guys on lkml
will still not like that very much.
Please see below.

I see your point in not wanting to have a symbol dependendy, I don't see
a path to do that without loosing type checking through.  Especially the
initialization is critical as the arguments needed for that are very
hardware specific.  Or is there any chance to come up with a set of
initialization parameters which we don't have to touch for each and
every new frontend?  So we can have a init function common to all dvb
frontends?
I don't think this is feasible, probably DVB-C/S/T will need different sets, too.

I also don't like the i2c_connect_client().  I think I'd prefeare to
have just this in i2c-core:

	struct i2c_driver* i2c_driver_get(char *name);
	i2c_driver_put(struct i2c_driver *drv);

i2c_driver_get() would just do the lookup, also care about module ref
counting and anything else which is needed (maybe even request_module()
?).  connecting/disconnection is left to the user (i.e. dvb adapter
driver in our case), which means we could have our own connect function,
maybe this way:
Ok.

Comments?
Sounds fine for me. Should I create a new patch and propose the idea on lkml, so we can see if the void * is going to be accepted? Or have you already implemented it?

  Gerd
CU
Michael.




Home | Main Index | Thread Index