From 3a74a9a1c0f6337f5c970de4d890f8f6841dc12f Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Mon, 2 Jan 2012 11:14:26 +0200 Subject: video: tegra: host: Access nvhost_master via drvdata Use standard drvdata interface for storing and accessing nvhost_master. Reviewed-on: http://git-master/r/72846 Change-Id: I191987c8f6d313a6ede9b59f723269cb6a197e8a Signed-off-by: Terje Bergstrom Signed-off-by: Varun Wadekar Reviewed-on: http://git-master/r/76815 Reviewed-by: Automatic_Commit_Validation_User --- include/linux/nvhost.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/linux/nvhost.h b/include/linux/nvhost.h index 6b3c9e366f30..7039fb06bc7b 100644 --- a/include/linux/nvhost.h +++ b/include/linux/nvhost.h @@ -52,7 +52,6 @@ struct nvhost_device { u32 num_resources; /* Number of resources following */ struct resource *resource; /* Resources (IOMEM in particular) */ - struct nvhost_master *host; /* Access to host1x resources */ u32 syncpts; /* Bitfield of sync points used */ u32 waitbases; /* Bit field of wait bases */ u32 modulemutexes; /* Bit field of module mutexes */ @@ -125,6 +124,8 @@ extern int nvhost_get_irq_byname(struct nvhost_device *, const char *); #define nvhost_get_drvdata(_dev) dev_get_drvdata(&(_dev)->dev) #define nvhost_set_drvdata(_dev, data) dev_set_drvdata(&(_dev)->dev, (data)) +#define nvhost_get_host(_dev) ((struct nvhost_master *) \ + dev_get_drvdata((_dev)->dev.parent)) int nvhost_bus_add_host(struct nvhost_master *host); -- cgit v1.2.3