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>
diff --git a/common/cros_ec.c b/common/cros_ec.c
index bb299bc..64b4679 100644
--- a/common/cros_ec.c
+++ b/common/cros_ec.c
@@ -35,7 +35,7 @@
 		debug("%s: Error %d\n", __func__, ret);
 		return NULL;
 	}
-	return dev->uclass_priv;
+	return dev_get_uclass_priv(dev);
 #else
 	return local.cros_ec_dev;
 #endif