Skip to content

Commit

Permalink
ASoC: Kill BUS_ID_SIZE
Browse files Browse the repository at this point in the history
Remove the use of BUS_ID_SIZE from txx9aclc.c, as BUS_ID_SIZE will be
removed soon later.

Also, use snprintf() instead of sprintf() as a safer operation.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Takashi Iwai committed Jun 17, 2009
1 parent 33745fb commit ef39412
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sound/soc/txx9/txx9aclc.c
Original file line number Diff line number Diff line change
Expand Up @@ -297,9 +297,9 @@ static int txx9aclc_pcm_new(struct snd_card *card, struct snd_soc_dai *dai,
static bool filter(struct dma_chan *chan, void *param)
{
struct txx9aclc_dmadata *dmadata = param;
char devname[BUS_ID_SIZE + 2];
char devname[20 + 2]; /* FIXME: old BUS_ID_SIZE + 2 */

sprintf(devname, "%s.%d", dmadata->dma_res->name,
snprintf(devname, sizeof(devname), "%s.%d", dmadata->dma_res->name,
(int)dmadata->dma_res->start);
if (strcmp(dev_name(chan->device->dev), devname) == 0) {
chan->private = &dmadata->dma_slave;
Expand Down

0 comments on commit ef39412

Please sign in to comment.