From 4b874134284b1dbb340f063fe0cf5141ffd416b1 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 20 Jan 2016 14:41:40 -0800 Subject: [PATCH] greybus: audio_codec: Don't be tricky with the driver model With the recent changes by Johan to the driver model of the greybus code, the audio_codec no longer should need to provide a "dummy" driver when registering the codec. In fact, having it there causes the greybus core to crash when inserting the module. Removing it all fixes the crash. Signed-off-by: Greg Kroah-Hartman --- drivers/staging/greybus/audio_codec.c | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/drivers/staging/greybus/audio_codec.c b/drivers/staging/greybus/audio_codec.c index 79f2baf607f4..5c02b6534ab2 100644 --- a/drivers/staging/greybus/audio_codec.c +++ b/drivers/staging/greybus/audio_codec.c @@ -571,13 +571,6 @@ static void gbaudio_free_codec(struct device *dev, * This is the basic hook get things initialized and registered w/ gb */ -/* - * GB codec module driver ops - */ -struct device_driver gb_codec_driver = { - .owner = THIS_MODULE, -}; - /* XXX * since BE DAI path is not yet properly closed from above layer, * dsp dai.mi2s_dai_data.status_mask is still set to STATUS_PORT_STARTED @@ -625,7 +618,6 @@ static void gb_audio_cleanup(struct gbaudio_codec_info *gb) static int gbaudio_codec_probe(struct gb_connection *connection) { int ret, i; - char *driver_name; struct gbaudio_codec_info *gbcodec; struct gb_audio_topology *topology; struct gb_audio_manager_module_descriptor desc; @@ -669,13 +661,6 @@ static int gbaudio_codec_probe(struct gb_connection *connection) for (i = 0; i < gbcodec->num_dais; i++) gbcodec->dais[i].ops = &gbcodec_dai_ops; - /* FIXME */ - driver_name = devm_kzalloc(dev, NAME_SIZE, GFP_KERNEL); - strlcpy(driver_name, gbcodec->name, NAME_SIZE); - gb_codec_driver.name = strsep(&driver_name, "."); - dev_dbg(dev, "driver.name:%s\n", gb_codec_driver.name); - dev->driver = &gb_codec_driver; - /* register codec */ ret = snd_soc_register_codec(dev, &soc_codec_dev_gbcodec, gbcodec->dais, 1); -- 2.20.1