| OLD | NEW |
| 1 /** | 1 /** |
| 2 * Freescale MPC8610HPCD ALSA SoC Machine driver | 2 * Freescale MPC8610HPCD ALSA SoC Machine driver |
| 3 * | 3 * |
| 4 * Author: Timur Tabi <timur@freescale.com> | 4 * Author: Timur Tabi <timur@freescale.com> |
| 5 * | 5 * |
| 6 * Copyright 2007-2010 Freescale Semiconductor, Inc. | 6 * Copyright 2007-2010 Freescale Semiconductor, Inc. |
| 7 * | 7 * |
| 8 * This file is licensed under the terms of the GNU General Public License | 8 * This file is licensed under the terms of the GNU General Public License |
| 9 * version 2. This program is licensed "as is" without any warranty of any | 9 * version 2. This program is licensed "as is" without any warranty of any |
| 10 * kind, whether express or implied. | 10 * kind, whether express or implied. |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 char platform_name[2][DAI_NAME_SIZE]; /* One for each DMA channel */ | 46 char platform_name[2][DAI_NAME_SIZE]; /* One for each DMA channel */ |
| 47 }; | 47 }; |
| 48 | 48 |
| 49 /** | 49 /** |
| 50 * mpc8610_hpcd_machine_probe: initialize the board | 50 * mpc8610_hpcd_machine_probe: initialize the board |
| 51 * | 51 * |
| 52 * This function is used to initialize the board-specific hardware. | 52 * This function is used to initialize the board-specific hardware. |
| 53 * | 53 * |
| 54 * Here we program the DMACR and PMUXCR registers. | 54 * Here we program the DMACR and PMUXCR registers. |
| 55 */ | 55 */ |
| 56 static int mpc8610_hpcd_machine_probe(struct platform_device *sound_device) | 56 static int mpc8610_hpcd_machine_probe(struct snd_soc_card *card) |
| 57 { | 57 { |
| 58 struct snd_soc_card *card = platform_get_drvdata(sound_device); | |
| 59 struct mpc8610_hpcd_data *machine_data = | 58 struct mpc8610_hpcd_data *machine_data = |
| 60 container_of(card, struct mpc8610_hpcd_data, card); | 59 container_of(card, struct mpc8610_hpcd_data, card); |
| 61 struct ccsr_guts_86xx __iomem *guts; | 60 struct ccsr_guts_86xx __iomem *guts; |
| 62 | 61 |
| 63 guts = ioremap(guts_phys, sizeof(struct ccsr_guts_86xx)); | 62 guts = ioremap(guts_phys, sizeof(struct ccsr_guts_86xx)); |
| 64 if (!guts) { | 63 if (!guts) { |
| 65 dev_err(card->dev, "could not map global utilities\n"); | 64 dev_err(card->dev, "could not map global utilities\n"); |
| 66 return -ENOMEM; | 65 return -ENOMEM; |
| 67 } | 66 } |
| 68 | 67 |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 | 130 |
| 132 return 0; | 131 return 0; |
| 133 } | 132 } |
| 134 | 133 |
| 135 /** | 134 /** |
| 136 * mpc8610_hpcd_machine_remove: Remove the sound device | 135 * mpc8610_hpcd_machine_remove: Remove the sound device |
| 137 * | 136 * |
| 138 * This function is called to remove the sound device for one SSI. We | 137 * This function is called to remove the sound device for one SSI. We |
| 139 * de-program the DMACR and PMUXCR register. | 138 * de-program the DMACR and PMUXCR register. |
| 140 */ | 139 */ |
| 141 static int mpc8610_hpcd_machine_remove(struct platform_device *sound_device) | 140 static int mpc8610_hpcd_machine_remove(struct snd_soc_card *card) |
| 142 { | 141 { |
| 143 struct snd_soc_card *card = platform_get_drvdata(sound_device); | |
| 144 struct mpc8610_hpcd_data *machine_data = | 142 struct mpc8610_hpcd_data *machine_data = |
| 145 container_of(card, struct mpc8610_hpcd_data, card); | 143 container_of(card, struct mpc8610_hpcd_data, card); |
| 146 struct ccsr_guts_86xx __iomem *guts; | 144 struct ccsr_guts_86xx __iomem *guts; |
| 147 | 145 |
| 148 guts = ioremap(guts_phys, sizeof(struct ccsr_guts_86xx)); | 146 guts = ioremap(guts_phys, sizeof(struct ccsr_guts_86xx)); |
| 149 if (!guts) { | 147 if (!guts) { |
| 150 dev_err(card->dev, "could not map global utilities\n"); | 148 dev_err(card->dev, "could not map global utilities\n"); |
| 151 return -ENOMEM; | 149 return -ENOMEM; |
| 152 } | 150 } |
| 153 | 151 |
| (...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 581 { | 579 { |
| 582 platform_driver_unregister(&mpc8610_hpcd_driver); | 580 platform_driver_unregister(&mpc8610_hpcd_driver); |
| 583 } | 581 } |
| 584 | 582 |
| 585 module_init(mpc8610_hpcd_init); | 583 module_init(mpc8610_hpcd_init); |
| 586 module_exit(mpc8610_hpcd_exit); | 584 module_exit(mpc8610_hpcd_exit); |
| 587 | 585 |
| 588 MODULE_AUTHOR("Timur Tabi <timur@freescale.com>"); | 586 MODULE_AUTHOR("Timur Tabi <timur@freescale.com>"); |
| 589 MODULE_DESCRIPTION("Freescale MPC8610 HPCD ALSA SoC machine driver"); | 587 MODULE_DESCRIPTION("Freescale MPC8610 HPCD ALSA SoC machine driver"); |
| 590 MODULE_LICENSE("GPL v2"); | 588 MODULE_LICENSE("GPL v2"); |
| OLD | NEW |