Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 04cc79a0 authored by Takashi Iwai's avatar Takashi Iwai
Browse files

ALSA: seq: Use standard printk helpers



Use the standard pr_xxx() helpers instead of home-baked snd_print*().

Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent cf74dcf3
Loading
Loading
Loading
Loading
+8 −8
Original line number Diff line number Diff line
@@ -123,7 +123,7 @@ static inline int snd_seq_write_pool_allocated(struct snd_seq_client *client)
static struct snd_seq_client *clientptr(int clientid)
{
	if (clientid < 0 || clientid >= SNDRV_SEQ_MAX_CLIENTS) {
		snd_printd("Seq: oops. Trying to get pointer to client %d\n",
		pr_debug("ALSA: seq: oops. Trying to get pointer to client %d\n",
			   clientid);
		return NULL;
	}
@@ -136,7 +136,7 @@ struct snd_seq_client *snd_seq_client_use_ptr(int clientid)
	struct snd_seq_client *client;

	if (clientid < 0 || clientid >= SNDRV_SEQ_MAX_CLIENTS) {
		snd_printd("Seq: oops. Trying to get pointer to client %d\n",
		pr_debug("ALSA: seq: oops. Trying to get pointer to client %d\n",
			   clientid);
		return NULL;
	}
@@ -291,7 +291,7 @@ static void seq_free_client(struct snd_seq_client * client)
	mutex_lock(&register_mutex);
	switch (client->type) {
	case NO_CLIENT:
		snd_printk(KERN_WARNING "Seq: Trying to free unused client %d\n",
		pr_warn("ALSA: seq: Trying to free unused client %d\n",
			client->number);
		break;
	case USER_CLIENT:
@@ -301,7 +301,7 @@ static void seq_free_client(struct snd_seq_client * client)
		break;

	default:
		snd_printk(KERN_ERR "Seq: Trying to free client %d with undefined type = %d\n",
		pr_err("ALSA: seq: Trying to free client %d with undefined type = %d\n",
			   client->number, client->type);
	}
	mutex_unlock(&register_mutex);
@@ -773,7 +773,7 @@ static int broadcast_event(struct snd_seq_client *client,
static int multicast_event(struct snd_seq_client *client, struct snd_seq_event *event,
			   int atomic, int hop)
{
	snd_printd("seq: multicast not supported yet.\n");
	pr_debug("ALSA: seq: multicast not supported yet.\n");
	return 0; /* ignored */
}
#endif /* SUPPORT_BROADCAST */
@@ -794,7 +794,7 @@ static int snd_seq_deliver_event(struct snd_seq_client *client, struct snd_seq_e

	hop++;
	if (hop >= SNDRV_SEQ_MAX_HOPS) {
		snd_printd("too long delivery path (%d:%d->%d:%d)\n",
		pr_debug("ALSA: seq: too long delivery path (%d:%d->%d:%d)\n",
			   event->source.client, event->source.port,
			   event->dest.client, event->dest.port);
		return -EMLINK;
@@ -2196,7 +2196,7 @@ static int snd_seq_do_ioctl(struct snd_seq_client *client, unsigned int cmd,
		if (p->cmd == cmd)
			return p->func(client, arg);
	}
	snd_printd("seq unknown ioctl() 0x%x (type='%c', number=0x%02x)\n",
	pr_debug("ALSA: seq unknown ioctl() 0x%x (type='%c', number=0x%02x)\n",
		   cmd, _IOC_TYPE(cmd), _IOC_NR(cmd));
	return -ENOTTY;
}
+8 −8
Original line number Diff line number Diff line
@@ -325,7 +325,7 @@ int snd_seq_device_register_driver(char *id, struct snd_seq_dev_ops *entry,
		return -ENOMEM;
	}
	if (ops->driver & DRIVER_LOADED) {
		snd_printk(KERN_WARNING "driver_register: driver '%s' already exists\n", id);
		pr_warn("ALSA: seq: driver_register: driver '%s' already exists\n", id);
		unlock_driver(ops);
		snd_seq_autoload_unlock();
		return -EBUSY;
@@ -398,7 +398,7 @@ int snd_seq_device_unregister_driver(char *id)
		return -ENXIO;
	if (! (ops->driver & DRIVER_LOADED) ||
	    (ops->driver & DRIVER_LOCKED)) {
		snd_printk(KERN_ERR "driver_unregister: cannot unload driver '%s': status=%x\n",
		pr_err("ALSA: seq: driver_unregister: cannot unload driver '%s': status=%x\n",
			   id, ops->driver);
		unlock_driver(ops);
		return -EBUSY;
@@ -413,7 +413,7 @@ int snd_seq_device_unregister_driver(char *id)

	ops->driver = 0;
	if (ops->num_init_devices > 0)
		snd_printk(KERN_ERR "free_driver: init_devices > 0!! (%d)\n",
		pr_err("ALSA: seq: free_driver: init_devices > 0!! (%d)\n",
			   ops->num_init_devices);
	mutex_unlock(&ops->reg_mutex);

@@ -459,7 +459,7 @@ static int init_device(struct snd_seq_device *dev, struct ops_list *ops)
	if (dev->status != SNDRV_SEQ_DEVICE_FREE)
		return 0; /* already initialized */
	if (ops->argsize != dev->argsize) {
		snd_printk(KERN_ERR "incompatible device '%s' for plug-in '%s' (%d %d)\n",
		pr_err("ALSA: seq: incompatible device '%s' for plug-in '%s' (%d %d)\n",
			   dev->name, ops->id, ops->argsize, dev->argsize);
		return -EINVAL;
	}
@@ -467,7 +467,7 @@ static int init_device(struct snd_seq_device *dev, struct ops_list *ops)
		dev->status = SNDRV_SEQ_DEVICE_REGISTERED;
		ops->num_init_devices++;
	} else {
		snd_printk(KERN_ERR "init_device failed: %s: %s\n",
		pr_err("ALSA: seq: init_device failed: %s: %s\n",
			   dev->name, dev->id);
	}

@@ -486,7 +486,7 @@ static int free_device(struct snd_seq_device *dev, struct ops_list *ops)
	if (dev->status != SNDRV_SEQ_DEVICE_REGISTERED)
		return 0; /* not registered */
	if (ops->argsize != dev->argsize) {
		snd_printk(KERN_ERR "incompatible device '%s' for plug-in '%s' (%d %d)\n",
		pr_err("ALSA: seq: incompatible device '%s' for plug-in '%s' (%d %d)\n",
			   dev->name, ops->id, ops->argsize, dev->argsize);
		return -EINVAL;
	}
@@ -495,7 +495,7 @@ static int free_device(struct snd_seq_device *dev, struct ops_list *ops)
		dev->driver_data = NULL;
		ops->num_init_devices--;
	} else {
		snd_printk(KERN_ERR "free_device failed: %s: %s\n",
		pr_err("ALSA: seq: free_device failed: %s: %s\n",
			   dev->name, dev->id);
	}

@@ -559,7 +559,7 @@ static void __exit alsa_seq_device_exit(void)
	snd_info_free_entry(info_entry);
#endif
	if (num_ops)
		snd_printk(KERN_ERR "drivers not released (%d)\n", num_ops);
		pr_err("ALSA: seq: drivers not released (%d)\n", num_ops);
}

module_init(alsa_seq_device_init)
+1 −1
Original line number Diff line number Diff line
@@ -198,7 +198,7 @@ register_client(void)
	int i;

	if (ports < 1) {
		snd_printk(KERN_ERR "invalid number of ports %d\n", ports);
		pr_err("ALSA: seq_dummy: invalid number of ports %d\n", ports);
		return -EINVAL;
	}

+1 −1
Original line number Diff line number Diff line
@@ -34,7 +34,7 @@ struct snd_seq_fifo *snd_seq_fifo_new(int poolsize)

	f = kzalloc(sizeof(*f), GFP_KERNEL);
	if (f == NULL) {
		snd_printd("malloc failed for snd_seq_fifo_new() \n");
		pr_debug("ALSA: seq: malloc failed for snd_seq_fifo_new() \n");
		return NULL;
	}

+2 −2
Original line number Diff line number Diff line
@@ -31,12 +31,12 @@ void snd_use_lock_sync_helper(snd_use_lock_t *lockp, const char *file, int line)
	int max_count = 5 * HZ;

	if (atomic_read(lockp) < 0) {
		printk(KERN_WARNING "seq_lock: lock trouble [counter = %d] in %s:%d\n", atomic_read(lockp), file, line);
		pr_warn("ALSA: seq_lock: lock trouble [counter = %d] in %s:%d\n", atomic_read(lockp), file, line);
		return;
	}
	while (atomic_read(lockp) > 0) {
		if (max_count == 0) {
			snd_printk(KERN_WARNING "seq_lock: timeout [%d left] in %s:%d\n", atomic_read(lockp), file, line);
			pr_warn("ALSA: seq_lock: timeout [%d left] in %s:%d\n", atomic_read(lockp), file, line);
			break;
		}
		schedule_timeout_uninterruptible(1);
Loading