On 09/03/2014 01:38 PM, Mauro Carvalho Chehab wrote:
Em Wed, 03 Sep 2014 05:26:53 +0300
Antti Palosaari <crope@xxxxxx> escreveu:
On 09/02/2014 09:51 PM, Mauro Carvalho Chehab wrote:
Em Fri, 22 Aug 2014 13:58:08 +0300
Antti Palosaari <crope@xxxxxx> escreveu:
I like short names for things which are used everywhere overall the
driver. Due to that rename device state pointer from 'priv' to 's'.
Please, don't do that. "s" is generally used on several places for string.
If you want a shorter name, call it "st" for example.
huoh :/
st is not even much better. 'dev' seems to be the 'official' term. I
will start using it. There is one caveat when 'dev' is used as kernel
dev_foo() logging requires pointer to device, which is also called dev.
Yeah, on v4l2, we generally use 'dev' for such struct on several drivers.
Yet, it looks confusing, especially when some part of the code needs to
work with the private structure and struct device.
So, we end having things like dev->udev->dev inside them, with looks
ugly, IMHO.
I renamed it to dev due to 2 reasons (I did quite a lot of work to find
out which it should be):
1) it was mostly used term in kernel code base for that structure
holding device instance state
2) it was used in book Linux Device Drivers, Third Edition
regards
Antti
--
http://palosaari.fi/
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html