ALSA: hda/ca0132 - Fix type of INVALID_CHIP_ADDRESS
The chip address is 32bit long but INVALID_CHIP_ADDRESS is defined as
an unsigned long. This makes dsp_chip_to_dsp_addx() misbehaving on
64bit architectures. Fix the INVALID_CHIP_ADDRESS definition to be
32bit.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
diff --git a/sound/pci/hda/patch_ca0132.c b/sound/pci/hda/patch_ca0132.c
index b1e099a..fe07664 100644
--- a/sound/pci/hda/patch_ca0132.c
+++ b/sound/pci/hda/patch_ca0132.c
@@ -1598,7 +1598,7 @@
return Y_OFF(chip_addx);
}
- return (unsigned int)INVALID_CHIP_ADDRESS;
+ return INVALID_CHIP_ADDRESS;
}
/*
@@ -4540,7 +4540,7 @@
int i;
spec->dsp_state = DSP_DOWNLOAD_INIT;
- spec->curr_chip_addx = (unsigned int)INVALID_CHIP_ADDRESS;
+ spec->curr_chip_addx = INVALID_CHIP_ADDRESS;
snd_hda_power_up(codec);