mbox series

[0/2] ALSA: Constify static attribute_group structs

Message ID 20210131001241.2278-1-rikard.falkeborn@gmail.com
Headers show
Series ALSA: Constify static attribute_group structs | expand

Message

Rikard Falkeborn Jan. 31, 2021, 12:12 a.m. UTC
Constify two static attribute_group structs that are never modified.
These two were the only static non-const ones in sound/.

Rikard Falkeborn (2):
  ALSA: ac97: Constify static struct attribute_group
  ALSA: hda: Constify static attribute_group

 sound/ac97/bus.c       | 2 +-
 sound/hda/hdac_sysfs.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Takashi Iwai Jan. 31, 2021, 8:50 a.m. UTC | #1
On Sun, 31 Jan 2021 01:12:41 +0100,
Rikard Falkeborn wrote:
> 
> The only usage of hdac_dev_attr_group is to put its address in an array
> of pointers to const attribute_group structs. Make it const to allow the
> compiler to put it in read-only memory.
> 
> Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>

Thanks, applied.


Takashi