]> git.kernelconcepts.de Git - karo-tx-uboot.git/commit
dm: core: Extend struct udevice by '.uclass_platdata' field.
authorPrzemyslaw Marczak <p.marczak@samsung.com>
Wed, 15 Apr 2015 11:07:18 +0000 (13:07 +0200)
committerLothar Waßmann <LW@KARO-electronics.de>
Tue, 8 Sep 2015 20:30:09 +0000 (22:30 +0200)
commit0229b1218e3d881aeb655c80438bcb2eccc15dab
tree055ae5f97346b09d7ab4e08fe1774cc7fcacc05a
parentaa35e4dcd2b9e9e22003d07883a4ffda2e1e0256
dm: core: Extend struct udevice by '.uclass_platdata' field.

This commit adds 'uclass_platdata' field to 'struct udevice', which
can be automatically allocated at bind. The allocation size is defined
in 'struct uclass_driver' as 'per_device_platdata_auto_alloc_size'.

New device's flag is added: DM_FLAG_ALLOC_UCLASS_PDATA, which is used
for memory freeing at device unbind method.

As for other udevice's fields, a complementary function is added:
- dev_get_uclass_platdata()

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Simon Glass <sjg@chromium.org>
Acked-by: Simon Glass <sjg@chromium.org>
drivers/core/device-remove.c
drivers/core/device.c
include/dm/device.h
include/dm/uclass.h