diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-06-29 22:45:04 +0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-06-30 02:04:32 +0400 |
commit | 704a28e88ab6c9cfe393ae626b612cab8b46028e (patch) | |
tree | 10a368c4af41c3d66a4665458455fb9ce785848a /drivers/media/dvb/frontends/drxk_hard.h | |
parent | 20bfe7ae089076b0af72a6d67f0298621ae90a9d (diff) | |
download | linux-704a28e88ab6c9cfe393ae626b612cab8b46028e.tar.xz |
[media] drxk: prevent doing something wrong when init is not ok
If firmware is not loaded for some reason, or if it is not ready
yet, it makes no sense to honour to any DVB callbacks.
So, return -EAGAIN, as the error condition may be temporary.
If the device doesn't initialize, either because it requires a
firmware or because there's an error during init_drxk, returns
-ENODEV, to indicate such error, on all DVB callbacks.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/frontends/drxk_hard.h')
-rw-r--r-- | drivers/media/dvb/frontends/drxk_hard.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/media/dvb/frontends/drxk_hard.h b/drivers/media/dvb/frontends/drxk_hard.h index c35ab2b37795..f41779700106 100644 --- a/drivers/media/dvb/frontends/drxk_hard.h +++ b/drivers/media/dvb/frontends/drxk_hard.h @@ -94,7 +94,15 @@ enum DRXPowerMode { enum AGC_CTRL_MODE { DRXK_AGC_CTRL_AUTO = 0, DRXK_AGC_CTRL_USER, DRXK_AGC_CTRL_OFF }; -enum EDrxkState { DRXK_UNINITIALIZED = 0, DRXK_STOPPED, DRXK_DTV_STARTED, DRXK_ATV_STARTED, DRXK_POWERED_DOWN }; +enum EDrxkState { + DRXK_UNINITIALIZED = 0, + DRXK_STOPPED, + DRXK_DTV_STARTED, + DRXK_ATV_STARTED, + DRXK_POWERED_DOWN, + DRXK_NO_DEV /* If drxk init failed */ +}; + enum EDrxkCoefArrayIndex { DRXK_COEF_IDX_MN = 0, DRXK_COEF_IDX_FM , |