Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
9f37762
erofs: fix bio->bi_max_vecs behavior change
Mar 6, 2021
ca667a3
USB: serial: cp210x: add ID for Acuity Brands nLight Air Adapter
sawaikaran Feb 16, 2021
42213a0
USB: serial: cp210x: add some more GE USB IDs
sre Feb 23, 2021
f164f5d
USB: serial: xr: fix NULL-deref on disconnect
jhovold Feb 26, 2021
5563b3b
USB: serial: ch341: add new Product ID
xaiki Mar 1, 2021
cfdc67a
USB: serial: io_edgeport: fix memory leak in edge_startup
pskrgag Mar 1, 2021
993bdde
kbuild: add image_name to no-sync-config-targets
masahir0y Feb 28, 2021
b3d9fc1
kbuild: dummy-tools: fix inverted tests for gcc
Mar 3, 2021
1f09af0
kbuild: Fix ld-version.sh script if LLD was built with LLD_VENDOR
berolinux Mar 2, 2021
16db6b5
habanalabs: mark hl_eq_inc_ptr() as static
ogabbay Feb 16, 2021
bd0c48e
drivers: habanalabs: remove unused dentry pointer for debugfs files
gregkh Feb 16, 2021
27ac5aa
habanalabs: Call put_pid() when releasing control device
Feb 19, 2021
ffd123f
habanalabs: Disable file operations after device is removed
Feb 1, 2021
15097e9
habanalabs: fix debugfs address translation
Farah-kassabri Feb 28, 2021
51f2403
cpu/hotplug: Fix build error of using {add,remove}_cpu() with !CONFIG…
Feb 21, 2021
e54b788
virt: acrn: Make remove_cpu sysfs invisible with !CONFIG_HOTPLUG_CPU
Feb 21, 2021
dcf9625
virt: acrn: Use vfs_poll() instead of f_op->poll()
YajunDeng Feb 21, 2021
7c36194
staging: rtl8192e: fix kconfig dependency on CRYPTO
julianbraha Feb 22, 2021
d660f4f
staging: rtl8712: unterminated string leads to read overflow
Feb 24, 2021
8687bf9
staging: rtl8192e: Fix possible buffer overflow in _rtl92e_wx_set_scan
lgtux Feb 26, 2021
b93c1e3
staging: rtl8712: Fix possible buffer overflow in r8712_sitesurvey_cmd
lgtux Mar 1, 2021
e163b98
staging: ks7010: prevent buffer overflow in ks_wlan_set_scan()
Mar 2, 2021
25317f4
staging: comedi: addi_apci_1032: Fix endian problem for COS sample
ian-abbott Feb 23, 2021
ac0bbf5
staging: comedi: addi_apci_1500: Fix endian problem for command sample
ian-abbott Feb 23, 2021
b2e7863
staging: comedi: adv_pci1710: Fix endian problem for AI command data
ian-abbott Feb 23, 2021
1c0f20b
staging: comedi: das6402: Fix endian problem for AI command data
ian-abbott Feb 23, 2021
459b1e8
staging: comedi: das800: Fix endian problem for AI command data
ian-abbott Feb 23, 2021
54999c0
staging: comedi: dmm32at: Fix endian problem for AI command data
ian-abbott Feb 23, 2021
b39dfcc
staging: comedi: me4000: Fix endian problem for AI command data
ian-abbott Feb 23, 2021
a084303
staging: comedi: pcl711: Fix endian problem for AI command data
ian-abbott Feb 23, 2021
148e34f
staging: comedi: pcl818: Fix endian problem for AI command data
ian-abbott Feb 23, 2021
8536749
staging: comedi: amplc_pc236_common: Use 16-bit 0 for interrupt data
ian-abbott Feb 23, 2021
a1acdbc
staging: comedi: comedi_parport: Use 16-bit 0 for interrupt data
ian-abbott Feb 23, 2021
3344463
staging: comedi: ni_6527: Use 16-bit 0 for interrupt data
ian-abbott Feb 23, 2021
5ff1c08
staging: comedi: ni_65xx: Use 16-bit 0 for interrupt data
ian-abbott Feb 23, 2021
fd3ce65
staging: comedi: pcl726: Use 16-bit 0 for interrupt data
ian-abbott Feb 23, 2021
8710751
staging: rtl8192u: fix ->ssid overflow in r8192_wx_set_scan()
Mar 5, 2021
d4ac640
staging: rtl8188eu: fix potential memory corruption in rtw_check_beac…
Mar 5, 2021
74b6b20
staging: rtl8188eu: prevent ->ssid overflow in rtw_wx_set_scan()
Mar 5, 2021
16d7586
Revert "staging: wfx: remove unused included header files"
gregkh Mar 9, 2021
1487e7b
leds: trigger: Fix error path to not unlock the unlocked mutex
Feb 19, 2021
ba8a86e
leds: trigger/tty: Use led_set_brightness_sync() from workqueue
Feb 19, 2021
2334de1
Revert "serial: max310x: rework RX interrupt handling"
shcgit Feb 17, 2021
c776b77
Revert "drivers:tty:pty: Fix a race causing data loss on close"
gregkh Mar 4, 2021
4d8654e
Goodix Fingerprint device is not a modem
yorickdewid Feb 13, 2021
1edbff9
usb: dwc3: qcom: add ACPI device id for sc8180x
Mar 1, 2021
650bf52
USB: gadget: u_ether: Fix a configfs return code
Feb 15, 2021
789ea77
usb: gadget: f_uac2: always increase endpoint max_packet_size by one …
rbilovol Mar 1, 2021
cc2ac63
usb: gadget: f_uac1: stop playback on function disable
rbilovol Mar 1, 2021
2664deb
usb: dwc3: qcom: Honor wakeup enabled/disabled state
Mar 2, 2021
b1d25e6
usb: renesas_usbhs: Clear PIPECFG for re-enabling pipe with other EPNUM
shimoday Mar 8, 2021
414c20d
USB: gadget: udc: s3c2410_udc: fix return value check in s3c2410_udc_…
Mar 5, 2021
9de2c43
USB: usblp: fix a hang in poll() if disconnected
Mar 4, 2021
1cffb1c
usb: dwc3: qcom: Add missing DWC3 OF node refcount decrement
fancer Feb 12, 2021
a758b7c
virt: acrn: Use EPOLLIN instead of POLLIN
YajunDeng Mar 10, 2021
1201d68
virt: acrn: Correct type casting of argument of copy_from_user()
Mar 10, 2021
20c4079
misc: fastrpc: restrict user apps from sending kernel RPC messages
lumag Feb 12, 2021
65527a5
misc/pvpanic: Export module FDT device table
shiloong Feb 18, 2021
47ccc8f
usbip: fix stub_dev to check for stream socket
shuahkh Mar 8, 2021
f55a057
usbip: fix vhci_hcd to check for stream socket
shuahkh Mar 8, 2021
6801854
usbip: fix vudc to check for stream socket
shuahkh Mar 8, 2021
9380afd
usbip: fix stub_dev usbip_sockfd_store() races leading to gpf
shuahkh Mar 8, 2021
718ad96
usbip: fix vhci_hcd attach_store() races leading to gpf
shuahkh Mar 8, 2021
46613c9
usbip: fix vudc usbip_sockfd_store races leading to gpf
shuahkh Mar 8, 2021
ce6ed1c
kbuild: rebuild GCC plugins when the compiler is upgraded
masahir0y Mar 4, 2021
2eab791
kbuild: dummy-tools: support MPROFILE_KERNEL checks for ppc
Mar 8, 2021
bf3c255
kbuild: Allow LTO to be selected with KASAN_HW_TAGS
samitolvanen Mar 8, 2021
f9bc754
kbuild: dummy-tools: adjust to scripts/cc-version.sh
masahir0y Mar 9, 2021
64bfc99
kbuild: remove unneeded -O option to dtc
masahir0y Mar 10, 2021
4c273d2
kbuild: remove LLVM=1 test from HAS_LTO_CLANG
masahir0y Mar 10, 2021
a949b9e
Merge tag 'usb-serial-5.12-rc3' of https://git.kernel.org/pub/scm/lin…
gregkh Mar 11, 2021
285a65f
kbuild: remove meaningless parameter to $(call if_changed_rule,dtc)
masahir0y Mar 11, 2021
a4a251f
usb: xhci: do not perform Soft Retry for some xHCI hosts
sgruszka Mar 11, 2021
253f588
xhci: Improve detection of device initiated wake signal.
matnyman Mar 11, 2021
b71c669
usb: xhci: Fix ASMedia ASM1042A and ASM3242 DMA addressing
cyrozap Mar 11, 2021
d26c00e
xhci: Fix repeated xhci wake after suspend due to uncleared internal …
matnyman Mar 11, 2021
bcbcf50
kbuild: fix ld-version.sh to not be affected by locale
masahir0y Mar 12, 2021
e83bad7
Merge tag 'kbuild-fixes-v5.12-2' of git://git.kernel.org/pub/scm/linu…
torvalds Mar 13, 2021
4206234
Merge tag 'erofs-for-5.12-rc3' of git://git.kernel.org/pub/scm/linux/…
torvalds Mar 13, 2021
5c7bdbf
Merge tag 'usb-5.12-rc3' of git://git.kernel.org/pub/scm/linux/kernel…
torvalds Mar 13, 2021
cc14086
Merge tag 'tty-5.12-rc3' of git://git.kernel.org/pub/scm/linux/kernel…
torvalds Mar 13, 2021
be61af3
Merge tag 'staging-5.12-rc3' of git://git.kernel.org/pub/scm/linux/ke…
torvalds Mar 13, 2021
88fe492
Merge tag 'char-misc-5.12-rc3' of git://git.kernel.org/pub/scm/linux/…
torvalds Mar 13, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,8 @@ no-dot-config-targets := $(clean-targets) \
$(version_h) headers headers_% archheaders archscripts \
%asm-generic kernelversion %src-pkg dt_binding_check \
outputmakefile
no-sync-config-targets := $(no-dot-config-targets) %install kernelrelease
no-sync-config-targets := $(no-dot-config-targets) %install kernelrelease \
image_name
single-targets := %.a %.i %.ko %.lds %.ll %.lst %.mod %.o %.s %.symtypes %/

config-build :=
Expand Down Expand Up @@ -478,6 +479,7 @@ USERINCLUDE := \
-I$(objtree)/arch/$(SRCARCH)/include/generated/uapi \
-I$(srctree)/include/uapi \
-I$(objtree)/include/generated/uapi \
-include $(srctree)/include/linux/compiler-version.h \
-include $(srctree)/include/linux/kconfig.h

# Use LINUXINCLUDE when you must reference the include/ directory.
Expand Down
3 changes: 1 addition & 2 deletions arch/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -632,13 +632,12 @@ config HAS_LTO_CLANG
def_bool y
# Clang >= 11: https://github.com/ClangBuiltLinux/linux/issues/510
depends on CC_IS_CLANG && CLANG_VERSION >= 110000 && LD_IS_LLD
depends on $(success,test $(LLVM) -eq 1)
depends on $(success,test $(LLVM_IAS) -eq 1)
depends on $(success,$(NM) --help | head -n 1 | grep -qi llvm)
depends on $(success,$(AR) --help | head -n 1 | grep -qi llvm)
depends on ARCH_SUPPORTS_LTO_CLANG
depends on !FTRACE_MCOUNT_USE_RECORDMCOUNT
depends on !KASAN
depends on !KASAN || KASAN_HW_TAGS
depends on !GCOV_KERNEL
help
The compiler and Kconfig options support building with Clang's
Expand Down
11 changes: 4 additions & 7 deletions drivers/leds/trigger/ledtrig-tty.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,8 @@ static ssize_t ttyname_store(struct device *dev,

if (size) {
ttyname = kmemdup_nul(buf, size, GFP_KERNEL);
if (!ttyname) {
ret = -ENOMEM;
goto out_unlock;
}
if (!ttyname)
return -ENOMEM;
} else {
ttyname = NULL;
}
Expand All @@ -69,7 +67,6 @@ static ssize_t ttyname_store(struct device *dev,

trigger_data->ttyname = ttyname;

out_unlock:
mutex_unlock(&trigger_data->mutex);

if (ttyname && !running)
Expand Down Expand Up @@ -125,12 +122,12 @@ static void ledtrig_tty_work(struct work_struct *work)

if (icount.rx != trigger_data->rx ||
icount.tx != trigger_data->tx) {
led_set_brightness(trigger_data->led_cdev, LED_ON);
led_set_brightness_sync(trigger_data->led_cdev, LED_ON);

trigger_data->rx = icount.rx;
trigger_data->tx = icount.tx;
} else {
led_set_brightness(trigger_data->led_cdev, LED_OFF);
led_set_brightness_sync(trigger_data->led_cdev, LED_OFF);
}

out:
Expand Down
5 changes: 5 additions & 0 deletions drivers/misc/fastrpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -950,6 +950,11 @@ static int fastrpc_internal_invoke(struct fastrpc_user *fl, u32 kernel,
if (!fl->cctx->rpdev)
return -EPIPE;

if (handle == FASTRPC_INIT_HANDLE && !kernel) {
dev_warn_ratelimited(fl->sctx->dev, "user app trying to send a kernel RPC message (%d)\n", handle);
return -EPERM;
}

ctx = fastrpc_context_alloc(fl, kernel, sc, args);
if (IS_ERR(ctx))
return PTR_ERR(ctx);
Expand Down
5 changes: 1 addition & 4 deletions drivers/misc/habanalabs/common/debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -992,7 +992,6 @@ void hl_debugfs_add_device(struct hl_device *hdev)
struct hl_dbg_device_entry *dev_entry = &hdev->hl_debugfs;
int count = ARRAY_SIZE(hl_debugfs_list);
struct hl_debugfs_entry *entry;
struct dentry *ent;
int i;

dev_entry->hdev = hdev;
Expand Down Expand Up @@ -1105,13 +1104,11 @@ void hl_debugfs_add_device(struct hl_device *hdev)
&hl_security_violations_fops);

for (i = 0, entry = dev_entry->entry_arr ; i < count ; i++, entry++) {

ent = debugfs_create_file(hl_debugfs_list[i].name,
debugfs_create_file(hl_debugfs_list[i].name,
0444,
dev_entry->root,
entry,
&hl_debugfs_fops);
entry->dent = ent;
entry->info_ent = &hl_debugfs_list[i];
entry->dev_entry = dev_entry;
}
Expand Down
40 changes: 35 additions & 5 deletions drivers/misc/habanalabs/common/device.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,19 @@ void hl_hpriv_put(struct hl_fpriv *hpriv)
static int hl_device_release(struct inode *inode, struct file *filp)
{
struct hl_fpriv *hpriv = filp->private_data;
struct hl_device *hdev = hpriv->hdev;

filp->private_data = NULL;

if (!hdev) {
pr_crit("Closing FD after device was removed. Memory leak will occur and it is advised to reboot.\n");
put_pid(hpriv->taskpid);
return 0;
}

hl_cb_mgr_fini(hpriv->hdev, &hpriv->cb_mgr);
hl_ctx_mgr_fini(hpriv->hdev, &hpriv->ctx_mgr);

filp->private_data = NULL;

hl_hpriv_put(hpriv);

return 0;
Expand All @@ -107,15 +114,20 @@ static int hl_device_release(struct inode *inode, struct file *filp)
static int hl_device_release_ctrl(struct inode *inode, struct file *filp)
{
struct hl_fpriv *hpriv = filp->private_data;
struct hl_device *hdev;
struct hl_device *hdev = hpriv->hdev;

filp->private_data = NULL;

hdev = hpriv->hdev;
if (!hdev) {
pr_err("Closing FD after device was removed\n");
goto out;
}

mutex_lock(&hdev->fpriv_list_lock);
list_del(&hpriv->dev_node);
mutex_unlock(&hdev->fpriv_list_lock);
out:
put_pid(hpriv->taskpid);

kfree(hpriv);

Expand All @@ -134,8 +146,14 @@ static int hl_device_release_ctrl(struct inode *inode, struct file *filp)
static int hl_mmap(struct file *filp, struct vm_area_struct *vma)
{
struct hl_fpriv *hpriv = filp->private_data;
struct hl_device *hdev = hpriv->hdev;
unsigned long vm_pgoff;

if (!hdev) {
pr_err_ratelimited("Trying to mmap after device was removed! Please close FD\n");
return -ENODEV;
}

vm_pgoff = vma->vm_pgoff;
vma->vm_pgoff = HL_MMAP_OFFSET_VALUE_GET(vm_pgoff);

Expand Down Expand Up @@ -883,6 +901,16 @@ static int device_kill_open_processes(struct hl_device *hdev, u32 timeout)
return -EBUSY;
}

static void device_disable_open_processes(struct hl_device *hdev)
{
struct hl_fpriv *hpriv;

mutex_lock(&hdev->fpriv_list_lock);
list_for_each_entry(hpriv, &hdev->fpriv_list, dev_node)
hpriv->hdev = NULL;
mutex_unlock(&hdev->fpriv_list_lock);
}

/*
* hl_device_reset - reset the device
*
Expand Down Expand Up @@ -1556,8 +1584,10 @@ void hl_device_fini(struct hl_device *hdev)
HL_PENDING_RESET_LONG_SEC);

rc = device_kill_open_processes(hdev, HL_PENDING_RESET_LONG_SEC);
if (rc)
if (rc) {
dev_crit(hdev->dev, "Failed to kill all open processes\n");
device_disable_open_processes(hdev);
}

hl_cb_pool_fini(hdev);

Expand Down
2 changes: 0 additions & 2 deletions drivers/misc/habanalabs/common/habanalabs.h
Original file line number Diff line number Diff line change
Expand Up @@ -1465,12 +1465,10 @@ struct hl_info_list {

/**
* struct hl_debugfs_entry - debugfs dentry wrapper.
* @dent: base debugfs entry structure.
* @info_ent: dentry realted ops.
* @dev_entry: ASIC specific debugfs manager.
*/
struct hl_debugfs_entry {
struct dentry *dent;
const struct hl_info_list *info_ent;
struct hl_dbg_device_entry *dev_entry;
};
Expand Down
12 changes: 12 additions & 0 deletions drivers/misc/habanalabs/common/habanalabs_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* All Rights Reserved.
*/

#define pr_fmt(fmt) "habanalabs: " fmt

#include <uapi/misc/habanalabs.h>
#include "habanalabs.h"

Expand Down Expand Up @@ -682,6 +684,11 @@ long hl_ioctl(struct file *filep, unsigned int cmd, unsigned long arg)
const struct hl_ioctl_desc *ioctl = NULL;
unsigned int nr = _IOC_NR(cmd);

if (!hdev) {
pr_err_ratelimited("Sending ioctl after device was removed! Please close FD\n");
return -ENODEV;
}

if ((nr >= HL_COMMAND_START) && (nr < HL_COMMAND_END)) {
ioctl = &hl_ioctls[nr];
} else {
Expand All @@ -700,6 +707,11 @@ long hl_ioctl_control(struct file *filep, unsigned int cmd, unsigned long arg)
const struct hl_ioctl_desc *ioctl = NULL;
unsigned int nr = _IOC_NR(cmd);

if (!hdev) {
pr_err_ratelimited("Sending ioctl after device was removed! Please close FD\n");
return -ENODEV;
}

if (nr == _IOC_NR(HL_IOCTL_INFO)) {
ioctl = &hl_ioctls_control[nr];
} else {
Expand Down
2 changes: 1 addition & 1 deletion drivers/misc/habanalabs/common/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ inline u32 hl_cq_inc_ptr(u32 ptr)
* Increment ptr by 1. If it reaches the number of event queue
* entries, set it to 0
*/
inline u32 hl_eq_inc_ptr(u32 ptr)
static inline u32 hl_eq_inc_ptr(u32 ptr)
{
ptr++;
if (unlikely(ptr == HL_EQ_LENGTH))
Expand Down
38 changes: 26 additions & 12 deletions drivers/misc/habanalabs/common/mmu/mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -499,18 +499,32 @@ static void hl_mmu_pa_page_with_offset(struct hl_ctx *ctx, u64 virt_addr,
else /* HL_VA_RANGE_TYPE_DRAM */
p = &prop->dmmu;

/*
* find the correct hop shift field in hl_mmu_properties structure
* in order to determine the right maks for the page offset.
*/
hop0_shift_off = offsetof(struct hl_mmu_properties, hop0_shift);
p = (char *)p + hop0_shift_off;
p = (char *)p + ((hops->used_hops - 1) * sizeof(u64));
hop_shift = *(u64 *)p;
offset_mask = (1ull << hop_shift) - 1;
addr_mask = ~(offset_mask);
*phys_addr = (tmp_phys_addr & addr_mask) |
(virt_addr & offset_mask);
if ((hops->range_type == HL_VA_RANGE_TYPE_DRAM) &&
!is_power_of_2(prop->dram_page_size)) {
u32 bit;
u64 page_offset_mask;
u64 phys_addr_mask;

bit = __ffs64((u64)prop->dram_page_size);
page_offset_mask = ((1ull << bit) - 1);
phys_addr_mask = ~page_offset_mask;
*phys_addr = (tmp_phys_addr & phys_addr_mask) |
(virt_addr & page_offset_mask);
} else {
/*
* find the correct hop shift field in hl_mmu_properties
* structure in order to determine the right masks
* for the page offset.
*/
hop0_shift_off = offsetof(struct hl_mmu_properties, hop0_shift);
p = (char *)p + hop0_shift_off;
p = (char *)p + ((hops->used_hops - 1) * sizeof(u64));
hop_shift = *(u64 *)p;
offset_mask = (1ull << hop_shift) - 1;
addr_mask = ~(offset_mask);
*phys_addr = (tmp_phys_addr & addr_mask) |
(virt_addr & offset_mask);
}
}

int hl_mmu_va_to_pa(struct hl_ctx *ctx, u64 virt_addr, u64 *phys_addr)
Expand Down
1 change: 1 addition & 0 deletions drivers/misc/pvpanic.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ static const struct of_device_id pvpanic_mmio_match[] = {
{ .compatible = "qemu,pvpanic-mmio", },
{}
};
MODULE_DEVICE_TABLE(of, pvpanic_mmio_match);

static const struct acpi_device_id pvpanic_device_ids[] = {
{ "QEMU0001", 0 },
Expand Down
4 changes: 3 additions & 1 deletion drivers/staging/comedi/drivers/addi_apci_1032.c
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ static irqreturn_t apci1032_interrupt(int irq, void *d)
struct apci1032_private *devpriv = dev->private;
struct comedi_subdevice *s = dev->read_subdev;
unsigned int ctrl;
unsigned short val;

/* check interrupt is from this device */
if ((inl(devpriv->amcc_iobase + AMCC_OP_REG_INTCSR) &
Expand All @@ -275,7 +276,8 @@ static irqreturn_t apci1032_interrupt(int irq, void *d)
outl(ctrl & ~APCI1032_CTRL_INT_ENA, dev->iobase + APCI1032_CTRL_REG);

s->state = inl(dev->iobase + APCI1032_STATUS_REG) & 0xffff;
comedi_buf_write_samples(s, &s->state, 1);
val = s->state;
comedi_buf_write_samples(s, &val, 1);
comedi_handle_events(dev, s);

/* enable the interrupt */
Expand Down
18 changes: 9 additions & 9 deletions drivers/staging/comedi/drivers/addi_apci_1500.c
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ static irqreturn_t apci1500_interrupt(int irq, void *d)
struct comedi_device *dev = d;
struct apci1500_private *devpriv = dev->private;
struct comedi_subdevice *s = dev->read_subdev;
unsigned int status = 0;
unsigned short status = 0;
unsigned int val;

val = inl(devpriv->amcc + AMCC_OP_REG_INTCSR);
Expand Down Expand Up @@ -238,14 +238,14 @@ static irqreturn_t apci1500_interrupt(int irq, void *d)
*
* Mask Meaning
* ---------- ------------------------------------------
* 0x00000001 Event 1 has occurred
* 0x00000010 Event 2 has occurred
* 0x00000100 Counter/timer 1 has run down (not implemented)
* 0x00001000 Counter/timer 2 has run down (not implemented)
* 0x00010000 Counter 3 has run down (not implemented)
* 0x00100000 Watchdog has run down (not implemented)
* 0x01000000 Voltage error
* 0x10000000 Short-circuit error
* 0b00000001 Event 1 has occurred
* 0b00000010 Event 2 has occurred
* 0b00000100 Counter/timer 1 has run down (not implemented)
* 0b00001000 Counter/timer 2 has run down (not implemented)
* 0b00010000 Counter 3 has run down (not implemented)
* 0b00100000 Watchdog has run down (not implemented)
* 0b01000000 Voltage error
* 0b10000000 Short-circuit error
*/
comedi_buf_write_samples(s, &status, 1);
comedi_handle_events(dev, s);
Expand Down
10 changes: 5 additions & 5 deletions drivers/staging/comedi/drivers/adv_pci1710.c
Original file line number Diff line number Diff line change
Expand Up @@ -300,11 +300,11 @@ static int pci1710_ai_eoc(struct comedi_device *dev,
static int pci1710_ai_read_sample(struct comedi_device *dev,
struct comedi_subdevice *s,
unsigned int cur_chan,
unsigned int *val)
unsigned short *val)
{
const struct boardtype *board = dev->board_ptr;
struct pci1710_private *devpriv = dev->private;
unsigned int sample;
unsigned short sample;
unsigned int chan;

sample = inw(dev->iobase + PCI171X_AD_DATA_REG);
Expand Down Expand Up @@ -345,7 +345,7 @@ static int pci1710_ai_insn_read(struct comedi_device *dev,
pci1710_ai_setup_chanlist(dev, s, &insn->chanspec, 1, 1);

for (i = 0; i < insn->n; i++) {
unsigned int val;
unsigned short val;

/* start conversion */
outw(0, dev->iobase + PCI171X_SOFTTRG_REG);
Expand Down Expand Up @@ -395,7 +395,7 @@ static void pci1710_handle_every_sample(struct comedi_device *dev,
{
struct comedi_cmd *cmd = &s->async->cmd;
unsigned int status;
unsigned int val;
unsigned short val;
int ret;

status = inw(dev->iobase + PCI171X_STATUS_REG);
Expand Down Expand Up @@ -455,7 +455,7 @@ static void pci1710_handle_fifo(struct comedi_device *dev,
}

for (i = 0; i < devpriv->max_samples; i++) {
unsigned int val;
unsigned short val;
int ret;

ret = pci1710_ai_read_sample(dev, s, s->async->cur_chan, &val);
Expand Down
Loading