diff --git a/core/modules/file/file.module b/core/modules/file/file.module
index 2141cae..7dae79d 100644
--- a/core/modules/file/file.module
+++ b/core/modules/file/file.module
@@ -194,7 +194,11 @@ function file_file_download($uri, $field_type = 'file') {
           $grants = array_merge($grants, array($module => module_invoke($module, 'file_download_access', $field, $entity_type, $entity)));
         }
         // Allow other modules to alter the returned grants/denies.
-        drupal_alter('file_download_access', $grants, $field, $entity_type, $entity);
+        $context = array(
+          'entity_type' => $entity_type,
+          'entity' => $entity,
+        );
+        drupal_alter('file_download_access', $grants, $field, $context);
 
         if (in_array(TRUE, $grants)) {
           // If TRUE is returned, access is granted and no further checks are
