Re: [PATCH next 09/25] input: keyboard: Use dev_get_drvdata()

From: Dmitry Torokhov
Date: Tue Apr 23 2019 - 04:44:18 EST


Hi Kefeng,

On Tue, Apr 23, 2019 at 03:50:04PM +0800, Kefeng Wang wrote:
> Using dev_get_drvdata directly.

This assumes that generic device's driver data is exactly the same as platform
device's driver data. This is true today, but does not have to be true
tomorrow.

What is the benefit of violating the layering and accessing "parent"
object's abstraction directly? Performance impact must be negligible...

Thanks.

--
Dmitry