Hi Arnd,

On December 5, 2014 2:33:11 AM PST, Arnd Bergmann <a...@arndb.de> wrote:
>On Thursday 04 December 2014 04:23:44 vishnupatekar wrote:
>> +
>> +struct sunxips2data {
>> +    int irq;
>> +    spinlock_t ps2_lock;
>> +    void __iomem *base_address;     /* virt address of control registers*/
>> +    struct serio *serio;            /* serio*/
>> +    struct device *dev;
>> +    struct  clk     *pclk;
>> +};
>
>As this is dynamically allocated, better embed the serio member
>directly to avoid allocating both separately.

That would be wrong - serio is refcounted and it may outlive instance of 
sunxips2data you embedded it into.


Thanks.

-- 
Dmitry

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to