Skip to content

Commit

Permalink
drm/i915: Fix implicit use of struct pci_dev
Browse files Browse the repository at this point in the history
intel_device_info.h references struct pci_dev but does not ensure that
the struct has been declared, causing build failures if something in
other headers changes so that the implicit dependency it is relying on
is no longer satisfied:

In file included from drivers/gpu/drm/i915/intel_device_info.h:32,
                 from drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h:11,
                 from drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c:11:
drivers/gpu/drm/i915/display/intel_display.h:643:39: error: 'struct pci_dev' declared inside parameter list will not be visible outside of this definition or declaration [-Werror]
  643 | bool intel_modeset_probe_defer(struct pci_dev *pdev);
      |                                       ^~~~~~~
cc1: all warnings being treated as errors

Add a declaration of the struct to fix this.

Signed-off-by: Mark Brown <broonie@kernel.org>
Fixes: 94b541f ("drm/i915: Add intel_modeset_probe_defer() helper")
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211213170753.3680209-1-broonie@kernel.org
  • Loading branch information
Mark Brown authored and Jani Nikula committed Dec 14, 2021
1 parent 6678916 commit 96db144
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/gpu/drm/i915/display/intel_display.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ struct intel_plane;
struct intel_plane_state;
struct intel_remapped_info;
struct intel_rotation_info;
struct pci_dev;

enum i915_gpio {
GPIOA,
Expand Down

0 comments on commit 96db144

Please sign in to comment.