diff options
author | Thierry Reding <treding@nvidia.com> | 2013-11-08 07:20:23 -0500 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2013-12-03 04:06:29 -0500 |
commit | d24b2898ceea603864c6d12540d6768edcc9cd40 (patch) | |
tree | 3d5997d8c1fbae1c2a8e9ddb0fbf1ae6334d4d79 /drivers/gpu/host1x | |
parent | 9ab34151a9aab94685a8ce4b030800151f2bca66 (diff) |
gpu: host1x: Fix a few sparse warnings
Include the bus.h header, so that various function declarations are
visible in the source file that implements those functions. This keeps
sparse from suggesting that they should be made static.
Make the host1x_bus_type variable static since it isn't used globally.
Finally replace the slightly unsafe dev_set_name(dev, name) by the more
secure dev_set_name(dev, "%s", name).
Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/gpu/host1x')
-rw-r--r-- | drivers/gpu/host1x/bus.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/host1x/bus.c b/drivers/gpu/host1x/bus.c index 509383f8be03..6a929591aa73 100644 --- a/drivers/gpu/host1x/bus.c +++ b/drivers/gpu/host1x/bus.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/of.h> | 19 | #include <linux/of.h> |
20 | #include <linux/slab.h> | 20 | #include <linux/slab.h> |
21 | 21 | ||
22 | #include "bus.h" | ||
22 | #include "dev.h" | 23 | #include "dev.h" |
23 | 24 | ||
24 | static DEFINE_MUTEX(clients_lock); | 25 | static DEFINE_MUTEX(clients_lock); |
@@ -257,7 +258,7 @@ static int host1x_unregister_client(struct host1x *host1x, | |||
257 | return -ENODEV; | 258 | return -ENODEV; |
258 | } | 259 | } |
259 | 260 | ||
260 | struct bus_type host1x_bus_type = { | 261 | static struct bus_type host1x_bus_type = { |
261 | .name = "host1x", | 262 | .name = "host1x", |
262 | }; | 263 | }; |
263 | 264 | ||
@@ -301,7 +302,7 @@ static int host1x_device_add(struct host1x *host1x, | |||
301 | device->dev.coherent_dma_mask = host1x->dev->coherent_dma_mask; | 302 | device->dev.coherent_dma_mask = host1x->dev->coherent_dma_mask; |
302 | device->dev.dma_mask = &device->dev.coherent_dma_mask; | 303 | device->dev.dma_mask = &device->dev.coherent_dma_mask; |
303 | device->dev.release = host1x_device_release; | 304 | device->dev.release = host1x_device_release; |
304 | dev_set_name(&device->dev, driver->name); | 305 | dev_set_name(&device->dev, "%s", driver->name); |
305 | device->dev.bus = &host1x_bus_type; | 306 | device->dev.bus = &host1x_bus_type; |
306 | device->dev.parent = host1x->dev; | 307 | device->dev.parent = host1x->dev; |
307 | 308 | ||