X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=sound%2Faoa%2Fsoundbus%2Fi2sbus%2Fi2sbus-core.c;h=b4590df0746689c8e3d4493eb894c8442b583055;hb=5579a782ad7ffa162b1060993e4a298dd50e7a33;hp=79fc4bc09e5e0e8de5a5b73f068324e4de6cd109;hpb=4f7a307dc6e4d8bfeb56f7cf7231b08cb845687c;p=linux-2.6-omap-h63xx.git diff --git a/sound/aoa/soundbus/i2sbus/i2sbus-core.c b/sound/aoa/soundbus/i2sbus/i2sbus-core.c index 79fc4bc09e5..b4590df0746 100644 --- a/sound/aoa/soundbus/i2sbus/i2sbus-core.c +++ b/sound/aoa/soundbus/i2sbus/i2sbus-core.c @@ -11,7 +11,6 @@ #include #include -#include #include #include @@ -23,9 +22,6 @@ MODULE_LICENSE("GPL"); MODULE_AUTHOR("Johannes Berg "); MODULE_DESCRIPTION("Apple Soundbus: I2S support"); -/* for auto-loading, declare that we handle this weird - * string that macio puts into the relevant device */ -MODULE_ALIAS("of:Ni2sTi2sC"); static int force; module_param(force, int, 0444); @@ -37,6 +33,8 @@ static struct of_device_id i2sbus_match[] = { { } }; +MODULE_DEVICE_TABLE(of, i2sbus_match); + static int alloc_dbdma_descriptor_ring(struct i2sbus_dev *i2sdev, struct dbdma_command_mem *r, int numcmds) @@ -161,7 +159,7 @@ static int i2sbus_add_dev(struct macio_dev *macio, struct i2sbus_dev *dev; struct device_node *child = NULL, *sound = NULL; struct resource *r; - int i, layout = 0, rlen; + int i, layout = 0, rlen, ok = force; static const char *rnames[] = { "i2sbus: %s (control)", "i2sbus: %s (tx)", "i2sbus: %s (rx)" }; @@ -194,7 +192,7 @@ static int i2sbus_add_dev(struct macio_dev *macio, layout = *layout_id; snprintf(dev->sound.modalias, 32, "sound-layout-%d", layout); - force = 1; + ok = 1; } } /* for the time being, until we can handle non-layout-id @@ -203,7 +201,7 @@ static int i2sbus_add_dev(struct macio_dev *macio, * When there are two i2s busses and only one has a layout-id, * then this depends on the order, but that isn't important * either as the second one in that case is just a modem. */ - if (!force) { + if (!ok) { kfree(dev); return -ENODEV; } @@ -336,8 +334,8 @@ static int i2sbus_probe(struct macio_dev* dev, const struct of_device_id *match) } while ((np = of_get_next_child(dev->ofdev.node, np))) { - if (device_is_compatible(np, "i2sbus") || - device_is_compatible(np, "i2s-modem")) { + if (of_device_is_compatible(np, "i2sbus") || + of_device_is_compatible(np, "i2s-modem")) { got += i2sbus_add_dev(dev, control, np); } }