Re: [PATCH 1/3] ASoC: da7219: Convert driver to use generic device/fwnode functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, May 05, 2016 at 11:53:04AM +0100, Adam Thomson wrote:

> This change converts the driver from using the of_* functions to using
> the device_* and fwnode_* functions for accssing DT related data.
> This is in preparation for updates to support ACPI based initialisation.

Is this *really* sensible?  DT idioms don't always match up with ACPI
idioms well and this isn't a trivial DT binding.

> +static struct fwnode_handle *da7219_aad_of_named_fwhandle(struct device *dev,
> +							  const char *name)
> +{
> +	struct fwnode_handle *child;
> +	struct device_node *of_node;
> +
> +	/* Find first matching child node */
> +	device_for_each_child_node(dev, child) {
> +		if (is_of_node(child)) {
> +			of_node = to_of_node(child);
> +			if (of_node_cmp(of_node->name, name) == 0)
> +				return child;
> +		}
> +	}
> +
> +	return NULL;
> +}

There's nothing device specific about this, it should go in generic
code.

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux