From fde469701c7efabebf885e785edf367bfb1a8f3f Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9my=20Lefaure?= Date: Wed, 15 Mar 2017 14:09:20 -0400 Subject: [PATCH] staging: media: atomisp: fill properly hmm_bo_type_strings when ION is disabled MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit When CONFIG_ION is disabled, HMM_BO_LAST is 3. In this case, "i" should not be added in hmm_bo_type_strings. Signed-off-by: Jérémy Lefaure Signed-off-by: Greg Kroah-Hartman --- drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm.c b/drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm.c index a362b492ec8e..e78f02f74d0f 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm.c +++ b/drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm.c @@ -49,7 +49,9 @@ const char *hmm_bo_type_strings[HMM_BO_LAST] = { "p", /* private */ "s", /* shared */ "u", /* user */ +#ifdef CONFIG_ION "i", /* ion */ +#endif }; static ssize_t bo_show(struct device *dev, struct device_attribute *attr, -- 2.30.2