[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1409569440-10979-14-git-send-email-abbotti@mev.co.uk>
Date: Mon, 1 Sep 2014 12:03:45 +0100
From: Ian Abbott <abbotti@....co.uk>
To: driverdev-devel@...uxdriverproject.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Ian Abbott <abbotti@....co.uk>,
H Hartley Sweeten <hartleys@...ionengravers.com>,
linux-kernel@...r.kernel.org
Subject: [PATCH 13/28] staging: comedi: amplc_pci230: shrink struct pci230_board
The `ai_bits`, `ao_bits`, and `min_hwver` members of `struct
pci230_board` are only set to small, non-negative values, so make them
`unsigned char`. The `have_dio` member is used as a boolean so change
it to a bitfield of type `bool`.
Signed-off-by: Ian Abbott <abbotti@....co.uk>
---
drivers/staging/comedi/drivers/amplc_pci230.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/comedi/drivers/amplc_pci230.c b/drivers/staging/comedi/drivers/amplc_pci230.c
index 75b0e79..7fa9c70 100644
--- a/drivers/staging/comedi/drivers/amplc_pci230.c
+++ b/drivers/staging/comedi/drivers/amplc_pci230.c
@@ -454,10 +454,10 @@ enum {
struct pci230_board {
const char *name;
unsigned short id;
- int ai_bits;
- int ao_bits;
- int have_dio;
- unsigned int min_hwver; /* Minimum hardware version supported. */
+ unsigned char ai_bits;
+ unsigned char ao_bits;
+ unsigned char min_hwver; /* Minimum hardware version supported. */
+ bool have_dio:1;
};
static const struct pci230_board pci230_boards[] = {
@@ -466,7 +466,7 @@ static const struct pci230_board pci230_boards[] = {
.id = PCI_DEVICE_ID_PCI230,
.ai_bits = 16,
.ao_bits = 12,
- .have_dio = 1,
+ .have_dio = true,
.min_hwver = 1,
},
{
@@ -480,7 +480,7 @@ static const struct pci230_board pci230_boards[] = {
.id = PCI_DEVICE_ID_PCI230,
.ai_bits = 12,
.ao_bits = 12,
- .have_dio = 1,
+ .have_dio = true,
},
{
.name = "pci260",
--
2.0.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists