| OLD | NEW |
| 1 /* | 1 /* |
| 2 * tegra_i2s.c - Tegra I2S driver | 2 * tegra_i2s.c - Tegra I2S driver |
| 3 * | 3 * |
| 4 * Author: Stephen Warren <swarren@nvidia.com> | 4 * Author: Stephen Warren <swarren@nvidia.com> |
| 5 * Copyright (C) 2010 - NVIDIA, Inc. | 5 * Copyright (C) 2010 - NVIDIA, Inc. |
| 6 * | 6 * |
| 7 * Based on code copyright/by: | 7 * Based on code copyright/by: |
| 8 * | 8 * |
| 9 * Copyright (c) 2009-2010, NVIDIA Corporation. | 9 * Copyright (c) 2009-2010, NVIDIA Corporation. |
| 10 * Scott Peterson <speterson@nvidia.com> | 10 * Scott Peterson <speterson@nvidia.com> |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 .read = seq_read, | 97 .read = seq_read, |
| 98 .llseek = seq_lseek, | 98 .llseek = seq_lseek, |
| 99 .release = single_release, | 99 .release = single_release, |
| 100 }; | 100 }; |
| 101 | 101 |
| 102 static void tegra_i2s_debug_add(struct tegra_i2s *i2s, int id) | 102 static void tegra_i2s_debug_add(struct tegra_i2s *i2s, int id) |
| 103 { | 103 { |
| 104 char name[] = DRV_NAME ".0"; | 104 char name[] = DRV_NAME ".0"; |
| 105 | 105 |
| 106 snprintf(name, sizeof(name), DRV_NAME".%1d", id); | 106 snprintf(name, sizeof(name), DRV_NAME".%1d", id); |
| 107 » i2s->debug = debugfs_create_file(name, S_IRUGO, asoc_debugfs_root, | 107 » i2s->debug = debugfs_create_file(name, S_IRUGO, snd_soc_debugfs_root, |
| 108 i2s, &tegra_i2s_debug_fops); | 108 i2s, &tegra_i2s_debug_fops); |
| 109 } | 109 } |
| 110 | 110 |
| 111 static void tegra_i2s_debug_remove(struct tegra_i2s *i2s) | 111 static void tegra_i2s_debug_remove(struct tegra_i2s *i2s) |
| 112 { | 112 { |
| 113 if (i2s->debug) | 113 if (i2s->debug) |
| 114 debugfs_remove(i2s->debug); | 114 debugfs_remove(i2s->debug); |
| 115 } | 115 } |
| 116 #else | 116 #else |
| 117 static inline void tegra_i2s_debug_add(struct tegra_i2s *i2s) | 117 static inline void tegra_i2s_debug_add(struct tegra_i2s *i2s) |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 379 if (!i2s) { | 379 if (!i2s) { |
| 380 dev_err(&pdev->dev, "Can't allocate tegra_i2s\n"); | 380 dev_err(&pdev->dev, "Can't allocate tegra_i2s\n"); |
| 381 ret = -ENOMEM; | 381 ret = -ENOMEM; |
| 382 goto exit; | 382 goto exit; |
| 383 } | 383 } |
| 384 dev_set_drvdata(&pdev->dev, i2s); | 384 dev_set_drvdata(&pdev->dev, i2s); |
| 385 | 385 |
| 386 snprintf(clk_name, sizeof(clk_name), DRV_NAME ".%d", pdev->id); | 386 snprintf(clk_name, sizeof(clk_name), DRV_NAME ".%d", pdev->id); |
| 387 i2s->clk_i2s = clk_get_sys(clk_name, NULL); | 387 i2s->clk_i2s = clk_get_sys(clk_name, NULL); |
| 388 if (IS_ERR(i2s->clk_i2s)) { | 388 if (IS_ERR(i2s->clk_i2s)) { |
| 389 » » pr_err("Can't retrieve i2s clock\n"); | 389 » » dev_err(&pdev->dev, "Can't retrieve i2s clock\n"); |
| 390 ret = PTR_ERR(i2s->clk_i2s); | 390 ret = PTR_ERR(i2s->clk_i2s); |
| 391 goto err_free; | 391 goto err_free; |
| 392 } | 392 } |
| 393 | 393 |
| 394 mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 394 mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
| 395 if (!mem) { | 395 if (!mem) { |
| 396 dev_err(&pdev->dev, "No memory resource\n"); | 396 dev_err(&pdev->dev, "No memory resource\n"); |
| 397 ret = -ENODEV; | 397 ret = -ENODEV; |
| 398 goto err_clk_put; | 398 goto err_clk_put; |
| 399 } | 399 } |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 493 | 493 |
| 494 static void __exit snd_tegra_i2s_exit(void) | 494 static void __exit snd_tegra_i2s_exit(void) |
| 495 { | 495 { |
| 496 platform_driver_unregister(&tegra_i2s_driver); | 496 platform_driver_unregister(&tegra_i2s_driver); |
| 497 } | 497 } |
| 498 module_exit(snd_tegra_i2s_exit); | 498 module_exit(snd_tegra_i2s_exit); |
| 499 | 499 |
| 500 MODULE_AUTHOR("Stephen Warren <swarren@nvidia.com>"); | 500 MODULE_AUTHOR("Stephen Warren <swarren@nvidia.com>"); |
| 501 MODULE_DESCRIPTION("Tegra I2S ASoC driver"); | 501 MODULE_DESCRIPTION("Tegra I2S ASoC driver"); |
| 502 MODULE_LICENSE("GPL"); | 502 MODULE_LICENSE("GPL"); |
| 503 MODULE_ALIAS("platform:" DRV_NAME); |
| OLD | NEW |