···4949/* port id numbers for this client */5050static int announce_port = -1;51515252+/* number of subscriptions to announce port */5353+static int announce_subscribed;525453555456/* fill standard header data, source port & channel are filled in */5557static int setheader(struct snd_seq_event * ev, int client, int port)5658{5757- if (announce_port < 0)5959+ if (announce_port < 0 || !announce_subscribed)5860 return -ENODEV;59616062 memset(ev, 0, sizeof(struct snd_seq_event));···106104 return snd_seq_control_queue(ev, atomic, hop);107105}108106107107+static int sys_announce_subscribe(void *private_data,108108+ struct snd_seq_port_subscribe *info)109109+{110110+ announce_subscribed++;111111+ return 0;112112+}113113+114114+static int sys_announce_unsubscribe(void *private_data,115115+ struct snd_seq_port_subscribe *info)116116+{117117+ if (snd_BUG_ON(!announce_subscribed))118118+ return 0;119119+ announce_subscribed--;120120+ return 0;121121+}122122+109123/* register our internal client */110124int __init snd_seq_system_client_init(void)111125{···161143 /* register announcement port */162144 strcpy(port->name, "Announce");163145 port->capability = SNDRV_SEQ_PORT_CAP_READ|SNDRV_SEQ_PORT_CAP_SUBS_READ; /* for broadcast only */164164- port->kernel = NULL;146146+ pcallbacks.event_input = NULL;147147+ pcallbacks.subscribe = sys_announce_subscribe;148148+ pcallbacks.unsubscribe = sys_announce_unsubscribe;149149+ port->kernel = &pcallbacks;165150 port->type = 0;166151 port->flags = SNDRV_SEQ_PORT_FLG_GIVEN_PORT;167152 port->addr.client = sysclient;
-2
sound/core/seq/seq_ump_client.c
···272272 new);273273 if (err < 0)274274 continue;275275- /* notify to system port */276276- snd_seq_system_client_ev_port_change(client->seq_client, i);277275 }278276}279277
+1-1
sound/pci/ac97/ac97_codec.c
···18641864 strcat(name, " ");18651865 strcat(name, pid->name);18661866 if (pid->mask != 0xffffffff)18671867- sprintf(name + strlen(name), " rev %d", id & ~pid->mask);18671867+ sprintf(name + strlen(name), " rev %u", id & ~pid->mask);18681868 if (ac97 && pid->patch) {18691869 if ((modem && (pid->flags & AC97_MODEM_PATCH)) ||18701870 (! modem && ! (pid->flags & AC97_MODEM_PATCH)))
-2
sound/pci/hda/hda_hwdep.c
···84848585static int hda_hwdep_open(struct snd_hwdep *hw, struct file *file)8686{8787-#ifndef CONFIG_SND_DEBUG_VERBOSE8887 if (!capable(CAP_SYS_RAWIO))8988 return -EACCES;9090-#endif9189 return 0;9290}9391
+1-1
sound/pci/hda/hda_sysfs.c
···648648 },649649};650650651651-/* check the line starting with '[' -- change the parser mode accodingly */651651+/* check the line starting with '[' -- change the parser mode accordingly */652652static int parse_line_mode(char *buf, struct hda_bus *bus)653653{654654 int i;