X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=sound%2Fppc%2Fpowermac.c;h=e9b02d974350532cae70ebbce704f816b266a603;hb=6da6711385165eff76411b77974eec13c5ef6486;hp=fa9a44ab487e8a35a46e0a4086849943719c5f5f;hpb=55c385ad5e1f3cda887cd6a8ad69a6d74b4b9125;p=~andy%2Flinux diff --git a/sound/ppc/powermac.c b/sound/ppc/powermac.c index fa9a44ab487..e9b02d97435 100644 --- a/sound/ppc/powermac.c +++ b/sound/ppc/powermac.c @@ -18,7 +18,6 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include #include #include #include @@ -111,7 +110,7 @@ static int __init snd_pmac_probe(struct platform_device *devptr) goto __error; break; default: - snd_printk("unsupported hardware %d\n", chip->model); + snd_printk(KERN_ERR "unsupported hardware %d\n", chip->model); err = -EINVAL; goto __error; } @@ -181,21 +180,14 @@ static int __init alsa_card_pmac_init(void) if ((err = platform_driver_register(&snd_pmac_driver)) < 0) return err; device = platform_device_register_simple(SND_PMAC_DRIVER, -1, NULL, 0); - if (!IS_ERR(device)) { - if (platform_get_drvdata(device)) - return 0; - platform_device_unregister(device); - err = -ENODEV; - } else - err = PTR_ERR(device); - platform_driver_unregister(&snd_pmac_driver); - return err; + return 0; } static void __exit alsa_card_pmac_exit(void) { - platform_device_unregister(device); + if (!IS_ERR(device)) + platform_device_unregister(device); platform_driver_unregister(&snd_pmac_driver); }