[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1452960878-1727-3-git-send-email-mail@alexanderkoch.net>
Date: Sat, 16 Jan 2016 17:14:37 +0100
From: Alexander Koch <mail@...xanderkoch.net>
To: jic23@...nel.org
Cc: knaack.h@....de, lars@...afoo.de, pmeerw@...erw.net,
mhornung.linux@...il.com, dannenberg@...com, balbi@...com,
fengguang.wu@...el.com, linux-iio@...r.kernel.org,
linux-kernel@...r.kernel.org,
Alexander Koch <mail@...xanderkoch.net>
Subject: [PATCH v2 2/3] iio: light: opt3001: trivial type refactoring
Change variable type of struct opt3001 members 'ok_to_ignore_lock' and
'result_ready' uint16-bitfield of length one to bool.
They are used as bool, let the compiler do the optimization.
Signed-off-by: Alexander Koch <mail@...xanderkoch.net>
Signed-off-by: Michael Hornung <mhornung.linux@...il.com>
---
drivers/iio/light/opt3001.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/iio/light/opt3001.c b/drivers/iio/light/opt3001.c
index aefbd79..b05c484 100644
--- a/drivers/iio/light/opt3001.c
+++ b/drivers/iio/light/opt3001.c
@@ -79,8 +79,8 @@ struct opt3001 {
struct device *dev;
struct mutex lock;
- u16 ok_to_ignore_lock:1;
- u16 result_ready:1;
+ bool ok_to_ignore_lock;
+ bool result_ready;
wait_queue_head_t result_ready_queue;
u16 result;
--
2.7.0
Powered by blists - more mailing lists