Message ID | 149338135275.2556.7708531564733886566.stgit@acox1-desk1.ger.corp.intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm.c b/drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm.c index 151abf0..14537ab 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm.c +++ b/drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm.c @@ -226,6 +226,11 @@ ia_css_ptr hmm_alloc(size_t bytes, enum hmm_bo_type type, struct hmm_buffer_object *bo; int ret; + /* Check if we are initialized. In the ideal world we wouldn't need + this but we can tackle it once the driver is a lot cleaner */ + + if (!dummy_ptr) + hmm_init(); /*Get page number from size*/ pgnr = size_to_pgnr_ceil(bytes);
Currently the code handles this in the abstraction above. We want to remove that abstraction so begin by pushing down the sanity check. Unfortunately at this point we can't simply fix the init order. Signed-off-by: Alan Cox <alan@linux.intel.com> --- .../staging/media/atomisp/pci/atomisp2/hmm/hmm.c | 5 +++++ 1 file changed, 5 insertions(+)