OSDN Git Service

[media] siano: simplify firmware lookup logic
authorMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 19 Mar 2013 12:50:17 +0000 (09:50 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 21 Mar 2013 10:52:37 +0000 (07:52 -0300)
commit5ac14b60118071631bb0e2e50527c7528675648c
tree1a7fd9a4c7e1f608343e4fb9460626141f76ed3c
parent6a28bd94f4d068b6de65517e52f52b6840603d0a
[media] siano: simplify firmware lookup logic

There are two ways to specify firmware for siano devices: a
per-device ID and a per-device type.
The per-device type logic is currently made by a 11x9 string
table, sparsely filled. It is very hard to read the table at
the source code, as there are too much "none" filling there
("none" there is a way to tell NULL).
Instead of using such problematic table, convert it into an
easy to read table, where the unused values will be defaulted
to NULL.
While here, also simplifies a little bit the logic and print
a message if an user-selected mode doesn't exist.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/common/siano/smscoreapi.c