summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-07-10 11:02:58 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2013-07-10 11:02:58 -0700
commitbb93109e1544e2a4d12c2c35bf1af84c25a2699d (patch)
treee60cd9bc1efbaa9500a4ae59cf4f6186eb4ef29e /drivers/media
parent23e3a1d971f6658de5aa423011c153765f28fe26 (diff)
parentbcabcfd2e09ceb8599a33001e812e7cbad00fc4d (diff)
Merge tag 'firewire-updates' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394
Pull firewire updates from Stefan Richter: "Make struct ieee1394_device_id.driver_data actually avaliable to 1394 protocol drivers. This is especially useful to 1394 audio drivers for model-specific parameters and methods" * tag 'firewire-updates' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394: firewire: remove support of fw_driver.driver.probe and .remove methods firewire: introduce fw_driver.probe and .remove methods
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/firewire/firedtv-fw.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/drivers/media/firewire/firedtv-fw.c b/drivers/media/firewire/firedtv-fw.c
index e24ec539a5fd..247f0e7cb5f7 100644
--- a/drivers/media/firewire/firedtv-fw.c
+++ b/drivers/media/firewire/firedtv-fw.c
@@ -248,7 +248,7 @@ static const char * const model_names[] = {
/* Adjust the template string if models with longer names appear. */
#define MAX_MODEL_NAME_LEN sizeof("FireDTV ????")
-static int node_probe(struct device *dev)
+static int node_probe(struct fw_unit *unit, const struct ieee1394_device_id *id)
{
struct firedtv *fdtv;
char name[MAX_MODEL_NAME_LEN];
@@ -258,8 +258,8 @@ static int node_probe(struct device *dev)
if (!fdtv)
return -ENOMEM;
- dev_set_drvdata(dev, fdtv);
- fdtv->device = dev;
+ dev_set_drvdata(&unit->device, fdtv);
+ fdtv->device = &unit->device;
fdtv->isochannel = -1;
fdtv->voltage = 0xff;
fdtv->tone = 0xff;
@@ -269,7 +269,7 @@ static int node_probe(struct device *dev)
mutex_init(&fdtv->demux_mutex);
INIT_WORK(&fdtv->remote_ctrl_work, avc_remote_ctrl_work);
- name_len = fw_csr_string(fw_unit(dev)->directory, CSR_MODEL,
+ name_len = fw_csr_string(unit->directory, CSR_MODEL,
name, sizeof(name));
for (i = ARRAY_SIZE(model_names); --i; )
if (strlen(model_names[i]) <= name_len &&
@@ -277,7 +277,7 @@ static int node_probe(struct device *dev)
break;
fdtv->type = i;
- err = fdtv_register_rc(fdtv, dev);
+ err = fdtv_register_rc(fdtv, &unit->device);
if (err)
goto fail_free;
@@ -307,9 +307,9 @@ fail_free:
return err;
}
-static int node_remove(struct device *dev)
+static void node_remove(struct fw_unit *unit)
{
- struct firedtv *fdtv = dev_get_drvdata(dev);
+ struct firedtv *fdtv = dev_get_drvdata(&unit->device);
fdtv_dvb_unregister(fdtv);
@@ -320,7 +320,6 @@ static int node_remove(struct device *dev)
fdtv_unregister_rc(fdtv);
kfree(fdtv);
- return 0;
}
static void node_update(struct fw_unit *unit)
@@ -391,10 +390,10 @@ static struct fw_driver fdtv_driver = {
.owner = THIS_MODULE,
.name = "firedtv",
.bus = &fw_bus_type,
- .probe = node_probe,
- .remove = node_remove,
},
+ .probe = node_probe,
.update = node_update,
+ .remove = node_remove,
.id_table = fdtv_id_table,
};