diff options
author | Simon Glass <sjg@chromium.org> | 2015-03-05 22:25:20 +0300 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2015-04-17 04:27:42 +0300 |
commit | e564f054af002d9e6a1080ed9d4bc2c6052a4435 (patch) | |
tree | 7b945d568d32c7febf5a8b70c6bce26b5157663c /drivers/serial/serial-uclass.c | |
parent | 106cce9604306743c86addd4d27426cce498c9d1 (diff) | |
download | u-boot-e564f054af002d9e6a1080ed9d4bc2c6052a4435.tar.xz |
dm: core: Add dev_get_uclass_priv() to access uclass private data
Add a convenience function to access the private data that a uclass stores
for each of its devices. Convert over most existing uses for consistency
and to provide an example for others.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/serial/serial-uclass.c')
-rw-r--r-- | drivers/serial/serial-uclass.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/serial/serial-uclass.c b/drivers/serial/serial-uclass.c index 2de3737739..b239691efe 100644 --- a/drivers/serial/serial-uclass.c +++ b/drivers/serial/serial-uclass.c @@ -251,7 +251,7 @@ static int serial_post_probe(struct udevice *dev) { struct dm_serial_ops *ops = serial_get_ops(dev); #ifdef CONFIG_DM_STDIO - struct serial_dev_priv *upriv = dev->uclass_priv; + struct serial_dev_priv *upriv = dev_get_uclass_priv(dev); struct stdio_dev sdev; #endif int ret; @@ -299,7 +299,7 @@ static int serial_post_probe(struct udevice *dev) static int serial_pre_remove(struct udevice *dev) { #ifdef CONFIG_SYS_STDIO_DEREGISTER - struct serial_dev_priv *upriv = dev->uclass_priv; + struct serial_dev_priv *upriv = dev_get_uclass_priv(dev); if (stdio_deregister_dev(upriv->sdev, 0)) return -EPERM; |