]> git.baikalelectronics.ru Git - kernel.git/commit
drivers/video: fsl-diu-fb: use an enum for the AOI index
authorTimur Tabi <timur@freescale.com>
Wed, 28 Sep 2011 21:19:51 +0000 (16:19 -0500)
committerFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>
Wed, 5 Oct 2011 01:10:12 +0000 (01:10 +0000)
commit32b9bf21f466b613c9aa2e2f84ce5d46ca590b4a
tree24a2fab042da8c3de4434d5bf1eea999402e3417
parent2a77bb2f8391e36acf8cee4f4aadb88f4b176d8d
drivers/video: fsl-diu-fb: use an enum for the AOI index

Each of the five AOIs created by the DIU driver has a special purpose, and
they're not treated equally.  It makes sense to identify them with an enum
instead of a hard-coded number.

Since the 'index' is now an enum, it can only contain allowed values, so
there's no need to check for an invalid value.  This simplifies some other
code, such as fsl_diu_disable_panel(), which no longer needs to return an
error code.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
drivers/video/fsl-diu-fb.c