summaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorJonathan Corbet <corbet@lwn.net>2008-05-16 13:40:30 -0600
committerJonathan Corbet <corbet@lwn.net>2008-06-20 14:05:50 -0600
commitd21c95c569c462da20d491b75d0a45bd70ddc1bf (patch)
treec5efcd4a1ae50101a56abc1f5a27ef5173da209d /drivers/char
parent39d95b9d857ad9ed335dd1a2d6c6de1f1ee69ce1 (diff)
downloadop-kernel-dev-d21c95c569c462da20d491b75d0a45bd70ddc1bf.zip
op-kernel-dev-d21c95c569c462da20d491b75d0a45bd70ddc1bf.tar.gz
Add "no BKL needed" comments to several drivers
This documents the fact that somebody looked at the relevant open() functions and concluded that, due to their trivial nature, no locking was needed. Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/cs5535_gpio.c2
-rw-r--r--drivers/char/dtlk.c2
-rw-r--r--drivers/char/pc8736x_gpio.c1
-rw-r--r--drivers/char/ppdev.c1
-rw-r--r--drivers/char/scx200_gpio.c1
-rw-r--r--drivers/char/tb0219.c1
-rw-r--r--drivers/char/vr41xx_giu.c2
7 files changed, 10 insertions, 0 deletions
diff --git a/drivers/char/cs5535_gpio.c b/drivers/char/cs5535_gpio.c
index c0a4a0b..628e3d3 100644
--- a/drivers/char/cs5535_gpio.c
+++ b/drivers/char/cs5535_gpio.c
@@ -153,6 +153,8 @@ static ssize_t cs5535_gpio_read(struct file *file, char __user *buf,
return count;
}
+/* No BKL needed here - "mask" is the only global resource used
+ here and it's a boot-time parameter */
static int cs5535_gpio_open(struct inode *inode, struct file *file)
{
u32 m = iminor(inode);
diff --git a/drivers/char/dtlk.c b/drivers/char/dtlk.c
index abde6dd..433388c 100644
--- a/drivers/char/dtlk.c
+++ b/drivers/char/dtlk.c
@@ -288,6 +288,8 @@ static int dtlk_ioctl(struct inode *inode,
}
}
+/* No BKL needed here; "dtlk_busy" is the only global resource,
+ and it is not ever set by anybody (test is broken) */
static int dtlk_open(struct inode *inode, struct file *file)
{
TRACE_TEXT("(dtlk_open");
diff --git a/drivers/char/pc8736x_gpio.c b/drivers/char/pc8736x_gpio.c
index ecfaf18..8715dc9 100644
--- a/drivers/char/pc8736x_gpio.c
+++ b/drivers/char/pc8736x_gpio.c
@@ -212,6 +212,7 @@ static struct nsc_gpio_ops pc8736x_gpio_ops = {
.gpio_current = pc8736x_gpio_current
};
+/* No BKL needed here; no global resources accessed */
static int pc8736x_gpio_open(struct inode *inode, struct file *file)
{
unsigned m = iminor(inode);
diff --git a/drivers/char/ppdev.c b/drivers/char/ppdev.c
index 3aab837..ce19875 100644
--- a/drivers/char/ppdev.c
+++ b/drivers/char/ppdev.c
@@ -633,6 +633,7 @@ static int pp_ioctl(struct inode *inode, struct file *file,
return 0;
}
+/* No BKL needed here: only local resources used */
static int pp_open (struct inode * inode, struct file * file)
{
unsigned int minor = iminor(inode);
diff --git a/drivers/char/scx200_gpio.c b/drivers/char/scx200_gpio.c
index 99e5272..be2c623 100644
--- a/drivers/char/scx200_gpio.c
+++ b/drivers/char/scx200_gpio.c
@@ -46,6 +46,7 @@ struct nsc_gpio_ops scx200_gpio_ops = {
};
EXPORT_SYMBOL_GPL(scx200_gpio_ops);
+/* No BKL needed here: no global resources used */
static int scx200_gpio_open(struct inode *inode, struct file *file)
{
unsigned m = iminor(inode);
diff --git a/drivers/char/tb0219.c b/drivers/char/tb0219.c
index 4c431cb..db8c2ca 100644
--- a/drivers/char/tb0219.c
+++ b/drivers/char/tb0219.c
@@ -232,6 +232,7 @@ static ssize_t tanbac_tb0219_write(struct file *file, const char __user *data,
return i;
}
+/* No BKL needed here; no global resources accessed */
static int tanbac_tb0219_open(struct inode *inode, struct file *file)
{
unsigned int minor;
diff --git a/drivers/char/vr41xx_giu.c b/drivers/char/vr41xx_giu.c
index e5ed091..412937f 100644
--- a/drivers/char/vr41xx_giu.c
+++ b/drivers/char/vr41xx_giu.c
@@ -543,6 +543,8 @@ static ssize_t gpio_write(struct file *file, const char __user *data,
return i;
}
+/* No BKL needed here; only global (giu_nr_pins) is only set
+ at probe time */
static int gpio_open(struct inode *inode, struct file *file)
{
unsigned int pin;
OpenPOWER on IntegriCloud