This is the second attempt at moving priority handling into the core.

I have added two helper functions that allocate and free just a single
v4l2_fh struct. This can be used by drivers that do not need to embed the
struct v4l2_fh into a larger struct.

It is also called by the core for any driver that does not supply open()
or release() callbacks in struct v4l2_file_operations. This replaces the
awkward 'store priority in private_data' hack from the previous patch
series.

This means that almost all radio devices automatically support priority
handling (since most do not supply open/release).

This patch series also converts radio-mr800 (removing the bogus autopm
support allows us to remove the open/release support) and radio-cadet
(typical first-time open and close code, shows how easy it is to use
the helper functions).

ivtv is also converted as it is currently the only driver that embeds
struct v4l2_fh.

Core support for priority handling is necessary in order to have consistent
handling of priorities and to handle priorities and the control framework.

A lot of video drivers do something in open and/or release, so it is quite
a bit of work to implement this. However, the changes needed to convert a
driver are trivial and are easy to review.

Comments are welcome!

Regards,

        Hans

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to