diff options
author | Sakari Ailus <sakari.ailus@linux.intel.com> | 2016-09-06 14:51:17 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-10-21 18:59:07 +0200 |
commit | 624e9896c5bffee146ebb05b9366f8dc3f8b54aa (patch) | |
tree | 2d7765ccfb60b5edb9bb2e11ee8a871c81bfa706 /drivers/media/i2c/smiapp/smiapp.h | |
parent | [media] smiapp: Provide a common function to obtain native pixel array size (diff) | |
download | linux-624e9896c5bffee146ebb05b9366f8dc3f8b54aa.tar.xz linux-624e9896c5bffee146ebb05b9366f8dc3f8b54aa.zip |
[media] smiapp: Remove unnecessary BUG_ON()'s
Instead, calculate how much is needed and then allocate the memory
dynamically.
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/i2c/smiapp/smiapp.h')
-rw-r--r-- | drivers/media/i2c/smiapp/smiapp.h | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/media/i2c/smiapp/smiapp.h b/drivers/media/i2c/smiapp/smiapp.h index aae72bc87bf7..e71271ef764b 100644 --- a/drivers/media/i2c/smiapp/smiapp.h +++ b/drivers/media/i2c/smiapp/smiapp.h @@ -150,11 +150,6 @@ struct smiapp_csi_data_format { #define SMIAPP_PAD_SRC 1 #define SMIAPP_PADS 2 -#define SMIAPP_COMPRESSED_BASE 8 -#define SMIAPP_COMPRESSED_MAX 16 -#define SMIAPP_NR_OF_COMPRESSED (SMIAPP_COMPRESSED_MAX - \ - SMIAPP_COMPRESSED_BASE + 1) - struct smiapp_binning_subtype { u8 horizontal:4; u8 vertical:4; @@ -224,6 +219,7 @@ struct smiapp_sensor { bool streaming; bool dev_init_done; + u8 compressed_min_bpp; u8 *nvm; /* nvm memory buffer */ unsigned int nvm_size; /* bytes */ @@ -233,7 +229,7 @@ struct smiapp_sensor { struct smiapp_pll pll; /* Is a default format supported for a given BPP? */ - unsigned long valid_link_freqs[SMIAPP_NR_OF_COMPRESSED]; + unsigned long *valid_link_freqs; /* Pixel array controls */ struct v4l2_ctrl *analog_gain; |