From 624e9896c5bffee146ebb05b9366f8dc3f8b54aa Mon Sep 17 00:00:00 2001 From: Sakari Ailus Date: Tue, 6 Sep 2016 09:51:17 -0300 Subject: [media] smiapp: Remove unnecessary BUG_ON()'s Instead, calculate how much is needed and then allocate the memory dynamically. Signed-off-by: Sakari Ailus Reviewed-by: Sebastian Reichel Signed-off-by: Mauro Carvalho Chehab --- drivers/media/i2c/smiapp/smiapp.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'drivers/media/i2c/smiapp/smiapp.h') 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; -- cgit