[PATCHv3] Power5,Power6 BSR driver

Stephen Rothwell sfr at canb.auug.org.au
Tue Jul 8 14:52:34 EST 2008


Hi Sonny,

On Mon, 7 Jul 2008 21:58:12 -0500 Sonny Rao <sonnyrao at us.ibm.com> wrote:
>
> +static int bsr_create_devs(struct device_node *bn)
> +{

> +		cur->bsr_device = device_create(bsr_class, NULL,
> +						cur->bsr_dev,
> +						cur->bsr_name);
> +		if (!cur->bsr_device) {
> +			printk(KERN_ERR "device_create failed for %s\n",
> +			       cur->bsr_name);
> +			cdev_del(&cur->bsr_cdev);
> +			goto out_err;
> +		}
> +		dev_set_drvdata(cur->bsr_device, cur);

device_create() is being removed in 2.6.27 because the above introduces a
race, use device_create_drvdata() instead.

-- 
Cheers,
Stephen Rothwell                    sfr at canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20080708/0e07384e/attachment.pgp>


More information about the Linuxppc-dev mailing list