On 01/16/2013 05:56 PM, Denis CIOCCA wrote: > Hi Lars-Peter, > > >>> diff --git a/drivers/iio/accel/st_accel_buffer.c b/drivers/iio/accel/st_accel_buffer.c >> >> This file looks pretty much the same for all drivers, any reason why it >> can't be shared? > > >>> diff --git a/drivers/iio/accel/st_accel_core.c b/drivers/iio/accel/st_accel_core.c >> >> Here again the function looks exactly the same in all three drivers and >> could probably be moved to the common library. > > > You are right, but the idea is that: > one common library for all common functions, but leave the code clear ( > easy to read). > In the future I want to patch the current driver to support other features. > What do you think about? I'd move the common bits to the common library. Once you get to extending the drivers you can still add custom variants of theses functions. Only having one copy of a particular piece of code also makes the reviewers job easier. - Lars -- To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html