lkml.org 
[lkml]   [2003]   [Aug]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] 2.6.0-test3 zoran driver update
Ronald Bultje <rbultje@ronald.bitfreak.net> :
[avoid code duplication in {adv7170/adv7175/bt819/saa7111/saa7185}_write_block]
> I'm wondering how. I could make an inline function that each of them
> includes (but that doesn't decrease binary size, code is still
> duplicated), or I could make a parent module (and I don't want to do
> that). The only bad thing of the current way is the maintainance, but I
> don't really mind.

These functions differ only in:

struct XXX *encoder = i2c_get_clientdata(client);
^^^
[...]
do {
block_data[msg.len++] =
encoder->reg[reg++] = data[1];
^^^^^^^^^
[...]
if ((ret =
XXX_write(client, reg, *data++)) < 0)
^^^^^^^^^

Make i2c_get_clientdata() return a generic container struct which
provides instance specific methods to retrieve the "reg" member and
the XXX_write() function. Init these in XXX_detect_client() just
before i2c_set_clientdata() and it is done.

Patches that remove code used to make Penguin #0 happy. We want an happy
Penguin #0, don't we ? :o)

> Does it matter if I just keep it the way it is right now? I don't really
> mind at all.

Your choice. As a maintainer, you can say "It would be great. Volunteer
anyone ?" and see voluteer appearing.

[...]
> I'm moving some things explicitely to the long-term list, btw, that's on
> purpose. It'd be cool to handle the new DMA/PCI subsystem, but we've got
> many things to work on, some of which are more important than this.

Ok, I'll check http://mjpeg.sourceforge.net/driver-zoran/development.php and
try to kill one or two simple, self-contained, tasks.

[part-time kernel involvement]

Same thing here.

Regards

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

\
 
 \ /
  Last update: 2005-03-22 13:48    [W:0.156 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site