diff options
Diffstat (limited to 'sound/ppc')
| -rw-r--r-- | sound/ppc/keywest.c | 4 | ||||
| -rw-r--r-- | sound/ppc/pmac.c | 2 | ||||
| -rw-r--r-- | sound/ppc/powermac.c | 5 | ||||
| -rw-r--r-- | sound/ppc/snd_ps3.c | 10 | ||||
| -rw-r--r-- | sound/ppc/tumbler.c | 1 |
5 files changed, 12 insertions, 10 deletions
diff --git a/sound/ppc/keywest.c b/sound/ppc/keywest.c index 01aecc2b507..0d1c27e911b 100644 --- a/sound/ppc/keywest.c +++ b/sound/ppc/keywest.c @@ -65,7 +65,7 @@ static int keywest_attach_adapter(struct i2c_adapter *adapter) * already bound. If not it means binding failed, and then there * is no point in keeping the device instantiated. */ - if (!keywest_ctx->client->driver) { + if (!keywest_ctx->client->dev.driver) { i2c_unregister_device(keywest_ctx->client); keywest_ctx->client = NULL; return -ENODEV; @@ -76,7 +76,7 @@ static int keywest_attach_adapter(struct i2c_adapter *adapter) * This is safe because i2c-core holds the core_lock mutex for us. */ list_add_tail(&keywest_ctx->client->detected, - &keywest_ctx->client->driver->clients); + &to_i2c_driver(keywest_ctx->client->dev.driver)->clients); return 0; } diff --git a/sound/ppc/pmac.c b/sound/ppc/pmac.c index c93fbbb201f..7a43c0c3831 100644 --- a/sound/ppc/pmac.c +++ b/sound/ppc/pmac.c @@ -28,6 +28,8 @@ #include <linux/interrupt.h> #include <linux/pci.h> #include <linux/dma-mapping.h> +#include <linux/of_address.h> +#include <linux/of_irq.h> #include <sound/core.h> #include "pmac.h" #include <sound/pcm_params.h> diff --git a/sound/ppc/powermac.c b/sound/ppc/powermac.c index 09fc848d32e..350a7c8f86d 100644 --- a/sound/ppc/powermac.c +++ b/sound/ppc/powermac.c @@ -58,7 +58,7 @@ static int snd_pmac_probe(struct platform_device *devptr) char *name_ext; int err; - err = snd_card_create(index, id, THIS_MODULE, 0, &card); + err = snd_card_new(&devptr->dev, index, id, THIS_MODULE, 0, &card); if (err < 0) return err; @@ -122,8 +122,6 @@ static int snd_pmac_probe(struct platform_device *devptr) if (enable_beep) snd_pmac_attach_beep(chip); - snd_card_set_dev(card, &devptr->dev); - if ((err = snd_card_register(card)) < 0) goto __error; @@ -139,7 +137,6 @@ __error: static int snd_pmac_remove(struct platform_device *devptr) { snd_card_free(platform_get_drvdata(devptr)); - platform_set_drvdata(devptr, NULL); return 0; } diff --git a/sound/ppc/snd_ps3.c b/sound/ppc/snd_ps3.c index 8c7dcbe0118..58f292a87f9 100644 --- a/sound/ppc/snd_ps3.c +++ b/sound/ppc/snd_ps3.c @@ -933,8 +933,10 @@ static int snd_ps3_driver_probe(struct ps3_system_bus_device *dev) int i, ret; u64 lpar_addr, lpar_size; - BUG_ON(!firmware_has_feature(FW_FEATURE_PS3_LV1)); - BUG_ON(dev->match_id != PS3_MATCH_ID_SOUND); + if (WARN_ON(!firmware_has_feature(FW_FEATURE_PS3_LV1))) + return -ENODEV; + if (WARN_ON(dev->match_id != PS3_MATCH_ID_SOUND)) + return -ENODEV; the_card.ps3_dev = dev; @@ -982,7 +984,8 @@ static int snd_ps3_driver_probe(struct ps3_system_bus_device *dev) } /* create card instance */ - ret = snd_card_create(index, id, THIS_MODULE, 0, &the_card.card); + ret = snd_card_new(&dev->core, index, id, THIS_MODULE, + 0, &the_card.card); if (ret < 0) goto clean_irq; @@ -1050,7 +1053,6 @@ static int snd_ps3_driver_probe(struct ps3_system_bus_device *dev) snd_ps3_init_avsetting(&the_card); /* register the card */ - snd_card_set_dev(the_card.card, &dev->core); ret = snd_card_register(the_card.card); if (ret < 0) goto clean_dma_map; diff --git a/sound/ppc/tumbler.c b/sound/ppc/tumbler.c index b23354a4cec..b9ffc17a479 100644 --- a/sound/ppc/tumbler.c +++ b/sound/ppc/tumbler.c @@ -31,6 +31,7 @@ #include <linux/slab.h> #include <linux/interrupt.h> #include <linux/string.h> +#include <linux/of_irq.h> #include <sound/core.h> #include <asm/io.h> #include <asm/irq.h> |
