staging: media: atomisp: fill properly hmm_bo_type_strings when ION is disabled
authorJérémy Lefaure <jeremy.lefaure@lse.epita.fr>
Wed, 15 Mar 2017 18:09:20 +0000 (14:09 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 16 Mar 2017 02:28:01 +0000 (11:28 +0900)
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 <jeremy.lefaure@lse.epita.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm.c

index a362b492ec8ef02886f8f88249910cc9b3f3cf4e..e78f02f74d0ffe90fdcabb96388d68ee14648929 100644 (file)
@@ -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,