Lines Matching defs:svc

194  * @svc: Pointer to the service device
201 struct tb_service *svc;
228 tb_service_put(stream->svc);
252 return !tb_service_parent(stream->svc)->is_unplugged;
300 return tb_service_parent(sdev->stream->svc);
1229 /* svc->lock must be held */
1230 static void service_remove_properties(struct tb_service *svc, const char *name)
1234 if (!svc->local_properties)
1237 p = tb_property_find(svc->local_properties, name,
1243 dev_dbg(&svc->dev, "removed local directory %s\n", name);
1249 tb_property_for_each(svc->local_properties, p) {
1254 tb_property_free_dir(svc->local_properties);
1255 svc->local_properties = NULL;
1259 static int service_update_properties(struct tb_service *svc, const char *name,
1265 guard(mutex)(&svc->lock);
1268 service_remove_properties(svc, name);
1272 if (!svc->local_properties) {
1277 svc->local_properties = tb_property_copy_dir(tbstream_dir);
1278 if (!svc->local_properties)
1282 p = tb_property_find(svc->local_properties, name,
1294 dev_dbg(&svc->dev,
1309 ret = tb_property_add_dir(svc->local_properties, name, dir);
1315 dev_dbg(&svc->dev,
1332 ret = service_update_properties(stream->svc,
1336 tb_service_properties_changed(stream->svc);
1546 static void service_get_hopids(struct tb_service *svc, const char *name,
1552 guard(mutex)(&svc->lock);
1555 p = tb_property_find(svc->remote_properties, name,
1592 service_get_hopids(stream->svc, name, &sdev->in_hopid,
1600 service_update_properties(stream->svc, name, sdev->in_hopid,
1602 tb_service_properties_changed(stream->svc);
1619 xd = tb_service_parent(stream->svc);
1626 service_update_properties(stream->svc, name, 0, 0);
1627 tb_service_properties_changed(stream->svc);
1759 if (sysfs_streq(name, dev_name(&stream->svc->dev))) {
1789 const char *name = dev_name(&stream->svc->dev);
1851 static int tbstream_probe(struct tb_service *svc)
1861 stream->svc = tb_service_get(svc);
1868 tb_service_set_drvdata(svc, stream);
1872 static void tbstream_remove(struct tb_service *svc)
1874 struct tbstream *stream = tb_service_get_drvdata(svc);
1884 struct tb_service *svc = tb_to_service(dev);
1885 struct tbstream *stream = tb_service_get_drvdata(svc);
1907 struct tb_service *svc = tb_to_service(dev);
1908 struct tbstream *stream = tb_service_get_drvdata(svc);