aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/iio/adc/Kconfig2
-rw-r--r--drivers/iio/chemical/atlas-ph-sensor.c7
-rw-r--r--drivers/iio/temperature/maxim_thermocouple.c16
-rw-r--r--drivers/staging/android/ion/ion.c6
-rw-r--r--drivers/staging/android/ion/ion_of.c2
-rw-r--r--drivers/staging/greybus/arche-platform.c1
-rw-r--r--drivers/staging/greybus/es2.c3
-rw-r--r--drivers/staging/greybus/gpio.c6
-rw-r--r--drivers/staging/greybus/module.c2
-rw-r--r--drivers/staging/greybus/uart.c2
-rw-r--r--drivers/staging/iio/accel/sca3000_core.c2
-rw-r--r--drivers/staging/lustre/lustre/llite/lproc_llite.c34
-rw-r--r--drivers/staging/wilc1000/host_interface.c1
13 files changed, 46 insertions, 38 deletions
diff --git a/drivers/iio/adc/Kconfig b/drivers/iio/adc/Kconfig
index 7edcf3238620..99c051490eff 100644
--- a/drivers/iio/adc/Kconfig
+++ b/drivers/iio/adc/Kconfig
@@ -437,6 +437,8 @@ config STX104
437config TI_ADC081C 437config TI_ADC081C
438 tristate "Texas Instruments ADC081C/ADC101C/ADC121C family" 438 tristate "Texas Instruments ADC081C/ADC101C/ADC121C family"
439 depends on I2C 439 depends on I2C
440 select IIO_BUFFER
441 select IIO_TRIGGERED_BUFFER
440 help 442 help
441 If you say yes here you get support for Texas Instruments ADC081C, 443 If you say yes here you get support for Texas Instruments ADC081C,
442 ADC101C and ADC121C ADC chips. 444 ADC101C and ADC121C ADC chips.
diff --git a/drivers/iio/chemical/atlas-ph-sensor.c b/drivers/iio/chemical/atlas-ph-sensor.c
index bd321b305a0a..ef761a508630 100644
--- a/drivers/iio/chemical/atlas-ph-sensor.c
+++ b/drivers/iio/chemical/atlas-ph-sensor.c
@@ -213,13 +213,14 @@ static int atlas_check_ec_calibration(struct atlas_data *data)
213 struct device *dev = &data->client->dev; 213 struct device *dev = &data->client->dev;
214 int ret; 214 int ret;
215 unsigned int val; 215 unsigned int val;
216 __be16 rval;
216 217
217 ret = regmap_bulk_read(data->regmap, ATLAS_REG_EC_PROBE, &val, 2); 218 ret = regmap_bulk_read(data->regmap, ATLAS_REG_EC_PROBE, &rval, 2);
218 if (ret) 219 if (ret)
219 return ret; 220 return ret;
220 221
221 dev_info(dev, "probe set to K = %d.%.2d", be16_to_cpu(val) / 100, 222 val = be16_to_cpu(rval);
222 be16_to_cpu(val) % 100); 223 dev_info(dev, "probe set to K = %d.%.2d", val / 100, val % 100);
223 224
224 ret = regmap_read(data->regmap, ATLAS_REG_EC_CALIB_STATUS, &val); 225 ret = regmap_read(data->regmap, ATLAS_REG_EC_CALIB_STATUS, &val);
225 if (ret) 226 if (ret)
diff --git a/drivers/iio/temperature/maxim_thermocouple.c b/drivers/iio/temperature/maxim_thermocouple.c
index 39dd2026ccc9..066161a4bccd 100644
--- a/drivers/iio/temperature/maxim_thermocouple.c
+++ b/drivers/iio/temperature/maxim_thermocouple.c
@@ -123,22 +123,24 @@ static int maxim_thermocouple_read(struct maxim_thermocouple_data *data,
123{ 123{
124 unsigned int storage_bytes = data->chip->read_size; 124 unsigned int storage_bytes = data->chip->read_size;
125 unsigned int shift = chan->scan_type.shift + (chan->address * 8); 125 unsigned int shift = chan->scan_type.shift + (chan->address * 8);
126 unsigned int buf; 126 __be16 buf16;
127 __be32 buf32;
127 int ret; 128 int ret;
128 129
129 ret = spi_read(data->spi, (void *) &buf, storage_bytes);
130 if (ret)
131 return ret;
132
133 switch (storage_bytes) { 130 switch (storage_bytes) {
134 case 2: 131 case 2:
135 *val = be16_to_cpu(buf); 132 ret = spi_read(data->spi, (void *)&buf16, storage_bytes);
133 *val = be16_to_cpu(buf16);
136 break; 134 break;
137 case 4: 135 case 4:
138 *val = be32_to_cpu(buf); 136 ret = spi_read(data->spi, (void *)&buf32, storage_bytes);
137 *val = be32_to_cpu(buf32);
139 break; 138 break;
140 } 139 }
141 140
141 if (ret)
142 return ret;
143
142 /* check to be sure this is a valid reading */ 144 /* check to be sure this is a valid reading */
143 if (*val & data->chip->status_bit) 145 if (*val & data->chip->status_bit)
144 return -EINVAL; 146 return -EINVAL;
diff --git a/drivers/staging/android/ion/ion.c b/drivers/staging/android/ion/ion.c
index 396ded52ab70..209a8f7ef02b 100644
--- a/drivers/staging/android/ion/ion.c
+++ b/drivers/staging/android/ion/ion.c
@@ -1187,8 +1187,10 @@ int ion_query_heaps(struct ion_client *client, struct ion_heap_query *query)
1187 hdata.type = heap->type; 1187 hdata.type = heap->type;
1188 hdata.heap_id = heap->id; 1188 hdata.heap_id = heap->id;
1189 1189
1190 ret = copy_to_user(&buffer[cnt], 1190 if (copy_to_user(&buffer[cnt], &hdata, sizeof(hdata))) {
1191 &hdata, sizeof(hdata)); 1191 ret = -EFAULT;
1192 goto out;
1193 }
1192 1194
1193 cnt++; 1195 cnt++;
1194 if (cnt >= max_cnt) 1196 if (cnt >= max_cnt)
diff --git a/drivers/staging/android/ion/ion_of.c b/drivers/staging/android/ion/ion_of.c
index 15bac92b7f04..46b2bb99bfd6 100644
--- a/drivers/staging/android/ion/ion_of.c
+++ b/drivers/staging/android/ion/ion_of.c
@@ -107,7 +107,7 @@ struct ion_platform_data *ion_parse_dt(struct platform_device *pdev,
107 107
108 heap_pdev = of_platform_device_create(node, heaps[i].name, 108 heap_pdev = of_platform_device_create(node, heaps[i].name,
109 &pdev->dev); 109 &pdev->dev);
110 if (!pdev) 110 if (!heap_pdev)
111 return ERR_PTR(-ENOMEM); 111 return ERR_PTR(-ENOMEM);
112 heap_pdev->dev.platform_data = &heaps[i]; 112 heap_pdev->dev.platform_data = &heaps[i];
113 113
diff --git a/drivers/staging/greybus/arche-platform.c b/drivers/staging/greybus/arche-platform.c
index e36ee984485b..34307ac3f255 100644
--- a/drivers/staging/greybus/arche-platform.c
+++ b/drivers/staging/greybus/arche-platform.c
@@ -128,6 +128,7 @@ int arche_platform_change_state(enum arche_platform_state state,
128 pdev = of_find_device_by_node(np); 128 pdev = of_find_device_by_node(np);
129 if (!pdev) { 129 if (!pdev) {
130 pr_err("arche-platform device not found\n"); 130 pr_err("arche-platform device not found\n");
131 of_node_put(np);
131 return -ENODEV; 132 return -ENODEV;
132 } 133 }
133 134
diff --git a/drivers/staging/greybus/es2.c b/drivers/staging/greybus/es2.c
index 071bb1cfd3ae..baab460eeaa3 100644
--- a/drivers/staging/greybus/es2.c
+++ b/drivers/staging/greybus/es2.c
@@ -1548,7 +1548,8 @@ static int ap_probe(struct usb_interface *interface,
1548 INIT_LIST_HEAD(&es2->arpcs); 1548 INIT_LIST_HEAD(&es2->arpcs);
1549 spin_lock_init(&es2->arpc_lock); 1549 spin_lock_init(&es2->arpc_lock);
1550 1550
1551 if (es2_arpc_in_enable(es2)) 1551 retval = es2_arpc_in_enable(es2);
1552 if (retval)
1552 goto error; 1553 goto error;
1553 1554
1554 retval = gb_hd_add(hd); 1555 retval = gb_hd_add(hd);
diff --git a/drivers/staging/greybus/gpio.c b/drivers/staging/greybus/gpio.c
index 5e06e4229e42..250caa00de5e 100644
--- a/drivers/staging/greybus/gpio.c
+++ b/drivers/staging/greybus/gpio.c
@@ -702,15 +702,13 @@ static int gb_gpio_probe(struct gbphy_device *gbphy_dev,
702 ret = gb_gpio_irqchip_add(gpio, irqc, 0, 702 ret = gb_gpio_irqchip_add(gpio, irqc, 0,
703 handle_level_irq, IRQ_TYPE_NONE); 703 handle_level_irq, IRQ_TYPE_NONE);
704 if (ret) { 704 if (ret) {
705 dev_err(&connection->bundle->dev, 705 dev_err(&gbphy_dev->dev, "failed to add irq chip: %d\n", ret);
706 "failed to add irq chip: %d\n", ret);
707 goto exit_line_free; 706 goto exit_line_free;
708 } 707 }
709 708
710 ret = gpiochip_add(gpio); 709 ret = gpiochip_add(gpio);
711 if (ret) { 710 if (ret) {
712 dev_err(&connection->bundle->dev, 711 dev_err(&gbphy_dev->dev, "failed to add gpio chip: %d\n", ret);
713 "failed to add gpio chip: %d\n", ret);
714 goto exit_gpio_irqchip_remove; 712 goto exit_gpio_irqchip_remove;
715 } 713 }
716 714
diff --git a/drivers/staging/greybus/module.c b/drivers/staging/greybus/module.c
index 69f67ddbd4a3..660b4674a76f 100644
--- a/drivers/staging/greybus/module.c
+++ b/drivers/staging/greybus/module.c
@@ -127,7 +127,7 @@ struct gb_module *gb_module_create(struct gb_host_device *hd, u8 module_id,
127 return module; 127 return module;
128 128
129err_put_interfaces: 129err_put_interfaces:
130 for (--i; i > 0; --i) 130 for (--i; i >= 0; --i)
131 gb_interface_put(module->interfaces[i]); 131 gb_interface_put(module->interfaces[i]);
132 132
133 put_device(&module->dev); 133 put_device(&module->dev);
diff --git a/drivers/staging/greybus/uart.c b/drivers/staging/greybus/uart.c
index 5ee7954bd9f9..2633d2bfb1b4 100644
--- a/drivers/staging/greybus/uart.c
+++ b/drivers/staging/greybus/uart.c
@@ -888,7 +888,7 @@ static int gb_uart_probe(struct gbphy_device *gbphy_dev,
888 minor = alloc_minor(gb_tty); 888 minor = alloc_minor(gb_tty);
889 if (minor < 0) { 889 if (minor < 0) {
890 if (minor == -ENOSPC) { 890 if (minor == -ENOSPC) {
891 dev_err(&connection->bundle->dev, 891 dev_err(&gbphy_dev->dev,
892 "no more free minor numbers\n"); 892 "no more free minor numbers\n");
893 retval = -ENODEV; 893 retval = -ENODEV;
894 } else { 894 } else {
diff --git a/drivers/staging/iio/accel/sca3000_core.c b/drivers/staging/iio/accel/sca3000_core.c
index d626125d7af9..564b36d4f648 100644
--- a/drivers/staging/iio/accel/sca3000_core.c
+++ b/drivers/staging/iio/accel/sca3000_core.c
@@ -468,6 +468,8 @@ static inline int __sca3000_get_base_freq(struct sca3000_state *st,
468 case SCA3000_MEAS_MODE_OP_2: 468 case SCA3000_MEAS_MODE_OP_2:
469 *base_freq = info->option_mode_2_freq; 469 *base_freq = info->option_mode_2_freq;
470 break; 470 break;
471 default:
472 ret = -EINVAL;
471 } 473 }
472error_ret: 474error_ret:
473 return ret; 475 return ret;
diff --git a/drivers/staging/lustre/lustre/llite/lproc_llite.c b/drivers/staging/lustre/lustre/llite/lproc_llite.c
index 6eae60595905..23fda9d98bff 100644
--- a/drivers/staging/lustre/lustre/llite/lproc_llite.c
+++ b/drivers/staging/lustre/lustre/llite/lproc_llite.c
@@ -871,12 +871,10 @@ static ssize_t xattr_cache_store(struct kobject *kobj,
871} 871}
872LUSTRE_RW_ATTR(xattr_cache); 872LUSTRE_RW_ATTR(xattr_cache);
873 873
874static ssize_t unstable_stats_show(struct kobject *kobj, 874static int ll_unstable_stats_seq_show(struct seq_file *m, void *v)
875 struct attribute *attr,
876 char *buf)
877{ 875{
878 struct ll_sb_info *sbi = container_of(kobj, struct ll_sb_info, 876 struct super_block *sb = m->private;
879 ll_kobj); 877 struct ll_sb_info *sbi = ll_s2sbi(sb);
880 struct cl_client_cache *cache = sbi->ll_cache; 878 struct cl_client_cache *cache = sbi->ll_cache;
881 long pages; 879 long pages;
882 int mb; 880 int mb;
@@ -884,19 +882,21 @@ static ssize_t unstable_stats_show(struct kobject *kobj,
884 pages = atomic_long_read(&cache->ccc_unstable_nr); 882 pages = atomic_long_read(&cache->ccc_unstable_nr);
885 mb = (pages * PAGE_SIZE) >> 20; 883 mb = (pages * PAGE_SIZE) >> 20;
886 884
887 return sprintf(buf, "unstable_check: %8d\n" 885 seq_printf(m,
888 "unstable_pages: %12ld\n" 886 "unstable_check: %8d\n"
889 "unstable_mb: %8d\n", 887 "unstable_pages: %12ld\n"
890 cache->ccc_unstable_check, pages, mb); 888 "unstable_mb: %8d\n",
889 cache->ccc_unstable_check, pages, mb);
890
891 return 0;
891} 892}
892 893
893static ssize_t unstable_stats_store(struct kobject *kobj, 894static ssize_t ll_unstable_stats_seq_write(struct file *file,
894 struct attribute *attr, 895 const char __user *buffer,
895 const char *buffer, 896 size_t count, loff_t *off)
896 size_t count)
897{ 897{
898 struct ll_sb_info *sbi = container_of(kobj, struct ll_sb_info, 898 struct super_block *sb = ((struct seq_file *)file->private_data)->private;
899 ll_kobj); 899 struct ll_sb_info *sbi = ll_s2sbi(sb);
900 char kernbuf[128]; 900 char kernbuf[128];
901 int val, rc; 901 int val, rc;
902 902
@@ -922,7 +922,7 @@ static ssize_t unstable_stats_store(struct kobject *kobj,
922 922
923 return count; 923 return count;
924} 924}
925LUSTRE_RW_ATTR(unstable_stats); 925LPROC_SEQ_FOPS(ll_unstable_stats);
926 926
927static ssize_t root_squash_show(struct kobject *kobj, struct attribute *attr, 927static ssize_t root_squash_show(struct kobject *kobj, struct attribute *attr,
928 char *buf) 928 char *buf)
@@ -995,6 +995,7 @@ static struct lprocfs_vars lprocfs_llite_obd_vars[] = {
995 /* { "filegroups", lprocfs_rd_filegroups, 0, 0 }, */ 995 /* { "filegroups", lprocfs_rd_filegroups, 0, 0 }, */
996 { "max_cached_mb", &ll_max_cached_mb_fops, NULL }, 996 { "max_cached_mb", &ll_max_cached_mb_fops, NULL },
997 { "statahead_stats", &ll_statahead_stats_fops, NULL, 0 }, 997 { "statahead_stats", &ll_statahead_stats_fops, NULL, 0 },
998 { "unstable_stats", &ll_unstable_stats_fops, NULL },
998 { "sbi_flags", &ll_sbi_flags_fops, NULL, 0 }, 999 { "sbi_flags", &ll_sbi_flags_fops, NULL, 0 },
999 { .name = "nosquash_nids", 1000 { .name = "nosquash_nids",
1000 .fops = &ll_nosquash_nids_fops }, 1001 .fops = &ll_nosquash_nids_fops },
@@ -1026,7 +1027,6 @@ static struct attribute *llite_attrs[] = {
1026 &lustre_attr_max_easize.attr, 1027 &lustre_attr_max_easize.attr,
1027 &lustre_attr_default_easize.attr, 1028 &lustre_attr_default_easize.attr,
1028 &lustre_attr_xattr_cache.attr, 1029 &lustre_attr_xattr_cache.attr,
1029 &lustre_attr_unstable_stats.attr,
1030 &lustre_attr_root_squash.attr, 1030 &lustre_attr_root_squash.attr,
1031 NULL, 1031 NULL,
1032}; 1032};
diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index 78f5613e9467..6ab7443eabde 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -3388,7 +3388,6 @@ int wilc_init(struct net_device *dev, struct host_if_drv **hif_drv_handler)
3388 3388
3389 clients_count++; 3389 clients_count++;
3390 3390
3391 destroy_workqueue(hif_workqueue);
3392_fail_: 3391_fail_:
3393 return result; 3392 return result;
3394} 3393}