From 6ccacc5e4f961ca89bd6cc011ef6c29ae1962efa Mon Sep 17 00:00:00 2001 From: Gabor Juhos Date: Thu, 15 Jul 2010 13:05:16 +0000 Subject: generic: rtl8366: introduce rtl8366_smi_alloc git-svn-id: svn://svn.openwrt.org/openwrt/trunk@22195 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- target/linux/generic/files/drivers/net/phy/rtl8366rb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'target/linux/generic/files/drivers/net/phy/rtl8366rb.c') diff --git a/target/linux/generic/files/drivers/net/phy/rtl8366rb.c b/target/linux/generic/files/drivers/net/phy/rtl8366rb.c index 2156078f86..aa0b4a0b71 100644 --- a/target/linux/generic/files/drivers/net/phy/rtl8366rb.c +++ b/target/linux/generic/files/drivers/net/phy/rtl8366rb.c @@ -1133,14 +1133,12 @@ static int __init rtl8366rb_probe(struct platform_device *pdev) goto err_out; } - smi = kzalloc(sizeof(*smi), GFP_KERNEL); + smi = rtl8366_smi_alloc(&pdev->dev); if (!smi) { - dev_err(&pdev->dev, "no memory for private data\n"); err = -ENOMEM; goto err_out; } - smi->parent = &pdev->dev; smi->gpio_sda = pdata->gpio_sda; smi->gpio_sck = pdata->gpio_sck; smi->ops = &rtl8366rb_smi_ops; -- cgit v1.2.3