From e564f054af002d9e6a1080ed9d4bc2c6052a4435 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 5 Mar 2015 12:25:20 -0700 Subject: 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 --- drivers/misc/cros_ec_sandbox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/misc/cros_ec_sandbox.c') diff --git a/drivers/misc/cros_ec_sandbox.c b/drivers/misc/cros_ec_sandbox.c index 99cc529..282d8d8 100644 --- a/drivers/misc/cros_ec_sandbox.c +++ b/drivers/misc/cros_ec_sandbox.c @@ -470,7 +470,7 @@ static int process_cmd(struct ec_state *ec, #ifdef CONFIG_DM_CROS_EC int cros_ec_sandbox_packet(struct udevice *udev, int out_bytes, int in_bytes) { - struct cros_ec_dev *dev = udev->uclass_priv; + struct cros_ec_dev *dev = dev_get_uclass_priv(udev); struct ec_state *ec = dev_get_priv(dev->dev); #else int cros_ec_sandbox_packet(struct cros_ec_dev *dev, int out_bytes, -- cgit v1.1