[PATCH V3 10/13] net: smc911x: Pass around driver private data
Marek Vasut
marek.vasut at gmail.com
Wed Mar 25 17:40:09 CET 2020
On 3/25/20 5:14 PM, Harald Seiler wrote:
[...]
>> @@ -421,51 +436,52 @@ static int smc911x_initialize_mii(struct eth_device *dev)
>> int smc911x_initialize(u8 dev_num, int base_addr)
>> {
>> unsigned long addrl, addrh;
>> - struct eth_device *dev;
>> + struct smc911x_priv *priv;
>> int ret;
>>
>> - dev = calloc(1, sizeof(*dev));
>> + dev = calloc(1, sizeof(*priv));
>> if (!dev)
>> return -ENOMEM;
>
> Shouldn't this be
>
> priv = calloc(1, sizeof(*priv));
> if (!priv)
> return -ENOMEM;
>
> ?
Yes, it should.
[...]
--
Best regards,
Marek Vasut
More information about the U-Boot
mailing list