[alsa-devel] [PATCH 1/7] ALSA: firewire-digi00x: add skeleton for Digi 002/003 family

Takashi Iwai tiwai at suse.de
Wed Sep 30 15:04:32 CEST 2015


On Wed, 30 Sep 2015 02:39:16 +0200,
Takashi Sakamoto wrote:
> +static int name_card(struct snd_dg00x *dg00x)
> +{
> +	struct fw_device *fw_dev = fw_parent_device(dg00x->unit);
> +	char name[32] = {0};
> +	char *model;
> +	int err;
> +
> +	err = fw_csr_string(dg00x->unit->directory, CSR_MODEL, name,
> +			    sizeof(name));
> +	if (err < 0)
> +		return err;
> +
> +	model = name;
> +	if (model[0] == ' ')
> +		model = strchr(model, ' ') + 1;

You can use skip_spaces().


Takashi


More information about the Alsa-devel mailing list