Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'staging-3.12-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging

Pull staging fixes from Greg KH:
"Here are 4 tiny staging and iio driver fixes for 3.12-rc4. Nothing
major, just some small fixes for reported issues"

* tag 'staging-3.12-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
staging: comedi: ni_65xx: (bug fix) confine insn_bits to one subdevice
iio:magnetometer: Bugfix magnetometer default output registers
iio: Remove debugfs entries in iio_device_unregister()
iio: amplifiers: ad8366: Remove regulator_put

+21 -28
+1 -3
drivers/iio/amplifiers/ad8366.c
··· 185 185 186 186 iio_device_unregister(indio_dev); 187 187 188 - if (!IS_ERR(reg)) { 188 + if (!IS_ERR(reg)) 189 189 regulator_disable(reg); 190 - regulator_put(reg); 191 - } 192 190 193 191 return 0; 194 192 }
+1 -1
drivers/iio/industrialio-core.c
··· 852 852 iio_device_unregister_trigger_consumer(indio_dev); 853 853 iio_device_unregister_eventset(indio_dev); 854 854 iio_device_unregister_sysfs(indio_dev); 855 - iio_device_unregister_debugfs(indio_dev); 856 855 857 856 ida_simple_remove(&iio_ida, indio_dev->id); 858 857 kfree(indio_dev); ··· 1086 1087 1087 1088 if (indio_dev->chrdev.dev) 1088 1089 cdev_del(&indio_dev->chrdev); 1090 + iio_device_unregister_debugfs(indio_dev); 1089 1091 1090 1092 iio_disable_all_buffers(indio_dev); 1091 1093
+9 -9
drivers/iio/magnetometer/st_magn_core.c
··· 29 29 #define ST_MAGN_NUMBER_DATA_CHANNELS 3 30 30 31 31 /* DEFAULT VALUE FOR SENSORS */ 32 - #define ST_MAGN_DEFAULT_OUT_X_L_ADDR 0X04 33 - #define ST_MAGN_DEFAULT_OUT_Y_L_ADDR 0X08 34 - #define ST_MAGN_DEFAULT_OUT_Z_L_ADDR 0X06 32 + #define ST_MAGN_DEFAULT_OUT_X_H_ADDR 0X03 33 + #define ST_MAGN_DEFAULT_OUT_Y_H_ADDR 0X07 34 + #define ST_MAGN_DEFAULT_OUT_Z_H_ADDR 0X05 35 35 36 36 /* FULLSCALE */ 37 37 #define ST_MAGN_FS_AVL_1300MG 1300 ··· 117 117 static const struct iio_chan_spec st_magn_16bit_channels[] = { 118 118 ST_SENSORS_LSM_CHANNELS(IIO_MAGN, 119 119 BIT(IIO_CHAN_INFO_RAW) | BIT(IIO_CHAN_INFO_SCALE), 120 - ST_SENSORS_SCAN_X, 1, IIO_MOD_X, 's', IIO_LE, 16, 16, 121 - ST_MAGN_DEFAULT_OUT_X_L_ADDR), 120 + ST_SENSORS_SCAN_X, 1, IIO_MOD_X, 's', IIO_BE, 16, 16, 121 + ST_MAGN_DEFAULT_OUT_X_H_ADDR), 122 122 ST_SENSORS_LSM_CHANNELS(IIO_MAGN, 123 123 BIT(IIO_CHAN_INFO_RAW) | BIT(IIO_CHAN_INFO_SCALE), 124 - ST_SENSORS_SCAN_Y, 1, IIO_MOD_Y, 's', IIO_LE, 16, 16, 125 - ST_MAGN_DEFAULT_OUT_Y_L_ADDR), 124 + ST_SENSORS_SCAN_Y, 1, IIO_MOD_Y, 's', IIO_BE, 16, 16, 125 + ST_MAGN_DEFAULT_OUT_Y_H_ADDR), 126 126 ST_SENSORS_LSM_CHANNELS(IIO_MAGN, 127 127 BIT(IIO_CHAN_INFO_RAW) | BIT(IIO_CHAN_INFO_SCALE), 128 - ST_SENSORS_SCAN_Z, 1, IIO_MOD_Z, 's', IIO_LE, 16, 16, 129 - ST_MAGN_DEFAULT_OUT_Z_L_ADDR), 128 + ST_SENSORS_SCAN_Z, 1, IIO_MOD_Z, 's', IIO_BE, 16, 16, 129 + ST_MAGN_DEFAULT_OUT_Z_H_ADDR), 130 130 IIO_CHAN_SOFT_TIMESTAMP(3) 131 131 }; 132 132
+10 -15
drivers/staging/comedi/drivers/ni_65xx.c
··· 369 369 { 370 370 const struct ni_65xx_board *board = comedi_board(dev); 371 371 struct ni_65xx_private *devpriv = dev->private; 372 - unsigned base_bitfield_channel; 373 - const unsigned max_ports_per_bitfield = 5; 372 + int base_bitfield_channel; 374 373 unsigned read_bits = 0; 375 - unsigned j; 374 + int last_port_offset = ni_65xx_port_by_channel(s->n_chan - 1); 375 + int port_offset; 376 376 377 377 base_bitfield_channel = CR_CHAN(insn->chanspec); 378 - for (j = 0; j < max_ports_per_bitfield; ++j) { 379 - const unsigned port_offset = 380 - ni_65xx_port_by_channel(base_bitfield_channel) + j; 381 - const unsigned port = 382 - sprivate(s)->base_port + port_offset; 383 - unsigned base_port_channel; 378 + for (port_offset = ni_65xx_port_by_channel(base_bitfield_channel); 379 + port_offset <= last_port_offset; port_offset++) { 380 + unsigned port = sprivate(s)->base_port + port_offset; 381 + int base_port_channel = port_offset * ni_65xx_channels_per_port; 384 382 unsigned port_mask, port_data, port_read_bits; 385 - int bitshift; 386 - if (port >= ni_65xx_total_num_ports(board)) 383 + int bitshift = base_port_channel - base_bitfield_channel; 384 + 385 + if (bitshift >= 32) 387 386 break; 388 - base_port_channel = port_offset * ni_65xx_channels_per_port; 389 387 port_mask = data[0]; 390 388 port_data = data[1]; 391 - bitshift = base_port_channel - base_bitfield_channel; 392 - if (bitshift >= 32 || bitshift <= -32) 393 - break; 394 389 if (bitshift > 0) { 395 390 port_mask >>= bitshift; 396 391 port_data >>= bitshift;