summaryrefslogtreecommitdiff
path: root/drivers/pcmcia/yenta_socket.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2022-01-11 23:41:13 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2022-01-11 23:41:13 +0300
commit4aa1b8257fba5931511a7e152bcbbb3dd673c6c1 (patch)
tree3397acac34b441d04724774de7b253c5b0a0c87f /drivers/pcmcia/yenta_socket.c
parentc288ea679840de4dee2ce6da5d0f139e3774ad86 (diff)
parentfbb3485f1f931102d8ba606f1c28123f5b48afa3 (diff)
downloadlinux-4aa1b8257fba5931511a7e152bcbbb3dd673c6c1.tar.xz
Merge branch 'pcmcia-next' of git://git.kernel.org/pub/scm/linux/kernel/git/brodo/linux
Pull pcmcia updates from Dominik Brodowski: "A number of odd cleanups and fixes, including one for a small race in the handling of the pccardd kernel thread" * 'pcmcia-next' of git://git.kernel.org/pub/scm/linux/kernel/git/brodo/linux: pcmcia: fix setting of kthread task states MAINTAINERS: update PCMCIA tree pcmcia: use sysfs_emit{,_at} for sysfs output pcmcia: make pcmcia_release_io() void, as no-one is interested in return value pcmcia: rsrc_nonstatic: Fix a NULL pointer dereference in nonstatic_find_mem_region() pcmcia: rsrc_nonstatic: Fix a NULL pointer dereference in __nonstatic_find_io_region() pcmcia: comment out unused exca_readw() function pcmcia: Make use of the helper macro SET_NOIRQ_SYSTEM_SLEEP_PM_OPS() pcmcia: clean up dead drivers for CompuLab CM-X255/CM-X270 boards
Diffstat (limited to 'drivers/pcmcia/yenta_socket.c')
-rw-r--r--drivers/pcmcia/yenta_socket.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/drivers/pcmcia/yenta_socket.c b/drivers/pcmcia/yenta_socket.c
index 84bfc0e85d6b..837877daed62 100644
--- a/drivers/pcmcia/yenta_socket.c
+++ b/drivers/pcmcia/yenta_socket.c
@@ -144,6 +144,7 @@ static inline u8 exca_readb(struct yenta_socket *socket, unsigned reg)
return val;
}
+/*
static inline u8 exca_readw(struct yenta_socket *socket, unsigned reg)
{
u16 val;
@@ -152,6 +153,7 @@ static inline u8 exca_readw(struct yenta_socket *socket, unsigned reg)
debug("%04x %04x\n", socket, reg, val);
return val;
}
+*/
static inline void exca_writeb(struct yenta_socket *socket, unsigned reg, u8 val)
{
@@ -176,16 +178,16 @@ static ssize_t show_yenta_registers(struct device *yentadev, struct device_attri
struct yenta_socket *socket = dev_get_drvdata(yentadev);
int offset = 0, i;
- offset = snprintf(buf, PAGE_SIZE, "CB registers:");
+ offset = sysfs_emit(buf, "CB registers:");
for (i = 0; i < 0x24; i += 4) {
unsigned val;
if (!(i & 15))
- offset += scnprintf(buf + offset, PAGE_SIZE - offset, "\n%02x:", i);
+ offset += sysfs_emit_at(buf, offset, "\n%02x:", i);
val = cb_readl(socket, i);
- offset += scnprintf(buf + offset, PAGE_SIZE - offset, " %08x", val);
+ offset += sysfs_emit_at(buf, offset, " %08x", val);
}
- offset += scnprintf(buf + offset, PAGE_SIZE - offset, "\n\nExCA registers:");
+ offset += sysfs_emit_at(buf, offset, "\n\nExCA registers:");
for (i = 0; i < 0x45; i++) {
unsigned char val;
if (!(i & 7)) {
@@ -193,12 +195,12 @@ static ssize_t show_yenta_registers(struct device *yentadev, struct device_attri
memcpy(buf + offset, " -", 2);
offset += 2;
} else
- offset += scnprintf(buf + offset, PAGE_SIZE - offset, "\n%02x:", i);
+ offset += sysfs_emit_at(buf, offset, "\n%02x:", i);
}
val = exca_readb(socket, i);
- offset += scnprintf(buf + offset, PAGE_SIZE - offset, " %02x", val);
+ offset += sysfs_emit_at(buf, offset, " %02x", val);
}
- buf[offset++] = '\n';
+ sysfs_emit_at(buf, offset, "\n");
return offset;
}
@@ -1342,12 +1344,7 @@ static int yenta_dev_resume_noirq(struct device *dev)
}
static const struct dev_pm_ops yenta_pm_ops = {
- .suspend_noirq = yenta_dev_suspend_noirq,
- .resume_noirq = yenta_dev_resume_noirq,
- .freeze_noirq = yenta_dev_suspend_noirq,
- .thaw_noirq = yenta_dev_resume_noirq,
- .poweroff_noirq = yenta_dev_suspend_noirq,
- .restore_noirq = yenta_dev_resume_noirq,
+ SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(yenta_dev_suspend_noirq, yenta_dev_resume_noirq)
};
#define YENTA_PM_OPS (&yenta_pm_ops)