@@ -2968,11 +2968,10 @@ static int intel_load_vbt_firmware(struct drm_i915_private *dev_priv,
}
if (intel_bios_is_valid_vbt(fw->data, fw->size)) {
- vbt->vbt_firmware = kmemdup(fw->data, fw->size, GFP_KERNEL);
- if (vbt->vbt_firmware) {
+ vbt->vbt = kmemdup(fw->data, fw->size, GFP_KERNEL);
+ if (vbt->vbt) {
drm_dbg_kms(&dev_priv->drm,
"Found valid VBT firmware \"%s\"\n", name);
- vbt->vbt = vbt->vbt_firmware;
vbt->vbt_size = fw->size;
vbt->type = I915_VBT_FIRMWARE;
ret = 0;
@@ -3273,12 +3272,10 @@ void intel_bios_driver_remove(struct drm_i915_private *i915)
switch (vbt->type) {
case I915_VBT_SPI:
case I915_VBT_OPROM:
+ case I915_VBT_FIRMWARE:
kfree(vbt->vbt);
vbt->type = I915_VBT_NONE;
break;
- case I915_VBT_FIRMWARE:
- kfree(vbt->vbt_firmware);
- fallthrough;
case I915_VBT_OPREGION:
vbt->vbt = NULL;
vbt->type = I915_VBT_NONE;
@@ -233,7 +233,6 @@ struct intel_vbt_data {
};
struct intel_vbt {
- void *vbt_firmware;
const void *vbt;
u32 vbt_size;
enum {
vbt_firmware was used to cache the vbt read from firmware. With introduction of intel_vbt, vbt field is used to cache the firmware read from different sources making vbt_firmware field redundant. Kill this field to simplify intel_vbt structure. Signed-off-by: Radhakrishna Sripada <radhakrishna.sripada@intel.com> --- drivers/gpu/drm/i915/display/intel_bios.c | 9 +++------ drivers/gpu/drm/i915/display/intel_display_core.h | 1 - 2 files changed, 3 insertions(+), 7 deletions(-)