diff options
Diffstat (limited to 'drivers/staging/greybus')
-rw-r--r-- | drivers/staging/greybus/TODO | 5 | ||||
-rw-r--r-- | drivers/staging/greybus/arche-platform.c | 9 | ||||
-rw-r--r-- | drivers/staging/greybus/audio_codec.h | 5 | ||||
-rw-r--r-- | drivers/staging/greybus/audio_topology.c | 2 | ||||
-rw-r--r-- | drivers/staging/greybus/camera.c | 17 | ||||
-rw-r--r-- | drivers/staging/greybus/svc.c | 3 |
6 files changed, 17 insertions, 24 deletions
diff --git a/drivers/staging/greybus/TODO b/drivers/staging/greybus/TODO new file mode 100644 index 000000000000..3b90a5711998 --- /dev/null +++ b/drivers/staging/greybus/TODO @@ -0,0 +1,5 @@ +* Convert all uses of the old GPIO API from <linux/gpio.h> to the + GPIO descriptor API in <linux/gpio/consumer.h> and look up GPIO + lines from device tree or ACPI. +* Convert the GPIO driver to use the GPIO irqchip library + GPIOLIB_IRQCHIP instead of reimplementing the same. diff --git a/drivers/staging/greybus/arche-platform.c b/drivers/staging/greybus/arche-platform.c index 83254a72a7bb..4c36e88766e7 100644 --- a/drivers/staging/greybus/arche-platform.c +++ b/drivers/staging/greybus/arche-platform.c @@ -315,8 +315,7 @@ static ssize_t state_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { - struct platform_device *pdev = to_platform_device(dev); - struct arche_platform_drvdata *arche_pdata = platform_get_drvdata(pdev); + struct arche_platform_drvdata *arche_pdata = dev_get_drvdata(dev); int ret = 0; mutex_lock(&arche_pdata->platform_state_mutex); @@ -448,7 +447,7 @@ static int arche_platform_probe(struct platform_device *pdev) arche_pdata->svc_reset_gpio = of_get_named_gpio(np, "svc,reset-gpio", 0); - if (arche_pdata->svc_reset_gpio < 0) { + if (!gpio_is_valid(arche_pdata->svc_reset_gpio)) { dev_err(dev, "failed to get reset-gpio\n"); return arche_pdata->svc_reset_gpio; } @@ -468,7 +467,7 @@ static int arche_platform_probe(struct platform_device *pdev) arche_pdata->svc_sysboot_gpio = of_get_named_gpio(np, "svc,sysboot-gpio", 0); - if (arche_pdata->svc_sysboot_gpio < 0) { + if (!gpio_is_valid(arche_pdata->svc_sysboot_gpio)) { dev_err(dev, "failed to get sysboot gpio\n"); return arche_pdata->svc_sysboot_gpio; } @@ -487,7 +486,7 @@ static int arche_platform_probe(struct platform_device *pdev) arche_pdata->svc_refclk_req = of_get_named_gpio(np, "svc,refclk-req-gpio", 0); - if (arche_pdata->svc_refclk_req < 0) { + if (!gpio_is_valid(arche_pdata->svc_refclk_req)) { dev_err(dev, "failed to get svc clock-req gpio\n"); return arche_pdata->svc_refclk_req; } diff --git a/drivers/staging/greybus/audio_codec.h b/drivers/staging/greybus/audio_codec.h index a1d5440552d4..4efd8b3ebe07 100644 --- a/drivers/staging/greybus/audio_codec.h +++ b/drivers/staging/greybus/audio_codec.h @@ -23,7 +23,10 @@ enum { NUM_CODEC_DAIS, }; -/* device_type should be same as defined in audio.h (Android media layer) */ +/* + * device_type should be same as defined in audio.h + * (Android media layer) + */ enum { GBAUDIO_DEVICE_NONE = 0x0, /* reserved bits */ diff --git a/drivers/staging/greybus/audio_topology.c b/drivers/staging/greybus/audio_topology.c index de4b1b2b12f3..15e57f701630 100644 --- a/drivers/staging/greybus/audio_topology.c +++ b/drivers/staging/greybus/audio_topology.c @@ -996,7 +996,7 @@ static int gbaudio_tplg_create_widget(struct gbaudio_module_info *module, ret = gbaudio_validate_kcontrol_count(w); if (ret) { - dev_err(module->dev, "Inavlid kcontrol count=%d for %s\n", + dev_err(module->dev, "Invalid kcontrol count=%d for %s\n", w->ncontrols, w->name); return ret; } diff --git a/drivers/staging/greybus/camera.c b/drivers/staging/greybus/camera.c index 07ebfb88db9b..341f729a9779 100644 --- a/drivers/staging/greybus/camera.c +++ b/drivers/staging/greybus/camera.c @@ -1174,11 +1174,6 @@ static int gb_camera_debugfs_init(struct gb_camera *gcam) gcam->bundle->id); gcam->debugfs.root = debugfs_create_dir(dirname, gb_debugfs_get()); - if (IS_ERR(gcam->debugfs.root)) { - gcam_err(gcam, "debugfs root create failed (%ld)\n", - PTR_ERR(gcam->debugfs.root)); - return PTR_ERR(gcam->debugfs.root); - } gcam->debugfs.buffers = vmalloc(sizeof(*gcam->debugfs.buffers) * GB_CAMERA_DEBUGFS_BUFFER_MAX); @@ -1188,18 +1183,12 @@ static int gb_camera_debugfs_init(struct gb_camera *gcam) for (i = 0; i < ARRAY_SIZE(gb_camera_debugfs_entries); ++i) { const struct gb_camera_debugfs_entry *entry = &gb_camera_debugfs_entries[i]; - struct dentry *dentry; gcam->debugfs.buffers[i].length = 0; - dentry = debugfs_create_file(entry->name, entry->mask, - gcam->debugfs.root, gcam, - &gb_camera_debugfs_ops); - if (IS_ERR(dentry)) { - gcam_err(gcam, - "debugfs operation %s create failed (%ld)\n", - entry->name, PTR_ERR(dentry)); - return PTR_ERR(dentry); + debugfs_create_file(entry->name, entry->mask, + gcam->debugfs.root, gcam, + &gb_camera_debugfs_ops); } } diff --git a/drivers/staging/greybus/svc.c b/drivers/staging/greybus/svc.c index a874fed761a1..a2bb7e1a3db3 100644 --- a/drivers/staging/greybus/svc.c +++ b/drivers/staging/greybus/svc.c @@ -1137,7 +1137,6 @@ static int gb_svc_intf_reset_recv(struct gb_operation *op) struct gb_svc *svc = gb_connection_get_data(op->connection); struct gb_message *request = op->request; struct gb_svc_intf_reset_request *reset; - u8 intf_id; if (request->payload_size < sizeof(*reset)) { dev_warn(&svc->dev, "short reset request received (%zu < %zu)\n", @@ -1146,8 +1145,6 @@ static int gb_svc_intf_reset_recv(struct gb_operation *op) } reset = request->payload; - intf_id = reset->intf_id; - /* FIXME Reset the interface here */ return 0; |