aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/misc/sparcspkr.c
diff options
context:
space:
mode:
authorJakub Kicinski <[email protected]>2025-05-15 18:22:32 +0000
committerJakub Kicinski <[email protected]>2025-05-15 18:28:30 +0000
commitbebd7b262638af611a0e699ba37c43ec2238801b (patch)
tree361c8116078d4923b630a5bff78614d136ba5716 /drivers/input/misc/sparcspkr.c
parentnet: prestera: Use to_delayed_work() (diff)
parentMerge tag 'net-6.15-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/net... (diff)
downloadkernel-bebd7b262638af611a0e699ba37c43ec2238801b.tar.gz
kernel-bebd7b262638af611a0e699ba37c43ec2238801b.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Cross-merge networking fixes after downstream PR (net-6.15-rc7). Conflicts: tools/testing/selftests/drivers/net/hw/ncdevmem.c 97c4e094a4b2 ("tests/ncdevmem: Fix double-free of queue array") 2f1a805f32ba ("selftests: ncdevmem: Implement devmem TCP TX") https://lore.kernel.org/[email protected] Adjacent changes: net/core/devmem.c net/core/devmem.h 0afc44d8cdf6 ("net: devmem: fix kernel panic when netlink socket close after module unload") bd61848900bf ("net: devmem: Implement TX path") Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'drivers/input/misc/sparcspkr.c')
-rw-r--r--drivers/input/misc/sparcspkr.c22
1 files changed, 16 insertions, 6 deletions
diff --git a/drivers/input/misc/sparcspkr.c b/drivers/input/misc/sparcspkr.c
index 8d7303fc13bc..1cfadd73829f 100644
--- a/drivers/input/misc/sparcspkr.c
+++ b/drivers/input/misc/sparcspkr.c
@@ -74,9 +74,14 @@ static int bbc_spkr_event(struct input_dev *dev, unsigned int type, unsigned int
return -1;
switch (code) {
- case SND_BELL: if (value) value = 1000;
- case SND_TONE: break;
- default: return -1;
+ case SND_BELL:
+ if (value)
+ value = 1000;
+ break;
+ case SND_TONE:
+ break;
+ default:
+ return -1;
}
if (value > 20 && value < 32767)
@@ -109,9 +114,14 @@ static int grover_spkr_event(struct input_dev *dev, unsigned int type, unsigned
return -1;
switch (code) {
- case SND_BELL: if (value) value = 1000;
- case SND_TONE: break;
- default: return -1;
+ case SND_BELL:
+ if (value)
+ value = 1000;
+ break;
+ case SND_TONE:
+ break;
+ default:
+ return -1;
}
if (value > 20 && value < 32767)