Re: [PATCH V3 net-next 3/6] net: Add a layer for non-PHY MII time stamping drivers.

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

 



> +struct mii_timestamper *register_mii_timestamper(struct device_node *node,
> +						 unsigned int port)
> +{
> +	struct mii_timestamper *mii_ts = NULL;
> +	struct mii_timestamping_desc *desc;
> +	struct list_head *this;
> +
> +	mutex_lock(&tstamping_devices_lock);
> +	list_for_each(this, &mii_timestamping_devices) {
> +		desc = list_entry(this, struct mii_timestamping_desc, list);
> +		if (desc->device->of_node == node) {
> +			mii_ts = desc->ctrl->probe_channel(desc->device, port);
> +			if (mii_ts) {
> +				mii_ts->device = desc->device;
> +				get_device(desc->device);

> + * @probe_channel:	Callback into the controller driver announcing the
> + *			presence of the 'port' channel.  The 'device' field
> + *			had been passed to register_mii_tstamp_controller().
> + *			The driver must return either a pointer to a valid
> + *			MII timestamper instance or PTR_ERR.

Hi Richard

probe_channel returns an PTR_ERR. So if (mii_ts) should probably be
if (IS_ERR(mii_ts))

   Andrew



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux