diff options
-rw-r--r-- | drivers/gpu/drm/tegra/vic.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/gpu/drm/tegra/vic.c b/drivers/gpu/drm/tegra/vic.c index b66b8d898cb1..18024183aa2b 100644 --- a/drivers/gpu/drm/tegra/vic.c +++ b/drivers/gpu/drm/tegra/vic.c | |||
@@ -285,21 +285,18 @@ static const struct of_device_id vic_match[] = { | |||
285 | 285 | ||
286 | static int vic_probe(struct platform_device *pdev) | 286 | static int vic_probe(struct platform_device *pdev) |
287 | { | 287 | { |
288 | struct vic_config *vic_config = NULL; | ||
289 | struct device *dev = &pdev->dev; | 288 | struct device *dev = &pdev->dev; |
290 | struct host1x_syncpt **syncpts; | 289 | struct host1x_syncpt **syncpts; |
291 | struct resource *regs; | 290 | struct resource *regs; |
292 | const struct of_device_id *match; | ||
293 | struct vic *vic; | 291 | struct vic *vic; |
294 | int err; | 292 | int err; |
295 | 293 | ||
296 | match = of_match_device(vic_match, dev); | ||
297 | vic_config = (struct vic_config *)match->data; | ||
298 | |||
299 | vic = devm_kzalloc(dev, sizeof(*vic), GFP_KERNEL); | 294 | vic = devm_kzalloc(dev, sizeof(*vic), GFP_KERNEL); |
300 | if (!vic) | 295 | if (!vic) |
301 | return -ENOMEM; | 296 | return -ENOMEM; |
302 | 297 | ||
298 | vic->config = of_device_get_match_data(dev); | ||
299 | |||
303 | syncpts = devm_kzalloc(dev, sizeof(*syncpts), GFP_KERNEL); | 300 | syncpts = devm_kzalloc(dev, sizeof(*syncpts), GFP_KERNEL); |
304 | if (!syncpts) | 301 | if (!syncpts) |
305 | return -ENOMEM; | 302 | return -ENOMEM; |
@@ -328,7 +325,7 @@ static int vic_probe(struct platform_device *pdev) | |||
328 | if (err < 0) | 325 | if (err < 0) |
329 | return err; | 326 | return err; |
330 | 327 | ||
331 | err = falcon_read_firmware(&vic->falcon, vic_config->firmware); | 328 | err = falcon_read_firmware(&vic->falcon, vic->config->firmware); |
332 | if (err < 0) | 329 | if (err < 0) |
333 | goto exit_falcon; | 330 | goto exit_falcon; |
334 | 331 | ||
@@ -341,7 +338,6 @@ static int vic_probe(struct platform_device *pdev) | |||
341 | vic->client.base.syncpts = syncpts; | 338 | vic->client.base.syncpts = syncpts; |
342 | vic->client.base.num_syncpts = 1; | 339 | vic->client.base.num_syncpts = 1; |
343 | vic->dev = dev; | 340 | vic->dev = dev; |
344 | vic->config = vic_config; | ||
345 | 341 | ||
346 | INIT_LIST_HEAD(&vic->client.list); | 342 | INIT_LIST_HEAD(&vic->client.list); |
347 | vic->client.ops = &vic_ops; | 343 | vic->client.ops = &vic_ops; |