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)
commit2572df91d5528dfc639e52b7caaed98e3dec1e18
tree24a2fab042da8c3de4434d5bf1eea999402e3417
parent760af8f83d73dcd2ddf0dc8ebefcf4f0569c1a89
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