[PATCH 03/28] staging: comedi: rti800: cleanup boardinfo

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



For aesthetic reasons, move the boardinfo table near the struct
definition. Reformat the boardinfo in C99 format and add some
whitespace to help readability.

Rename the boardinfotable so it has namespace associated with
the driver.

Signed-off-by: H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx>
Cc: Ian Abbott <abbotti@xxxxxxxxx>
Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/staging/comedi/drivers/rti800.c | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/comedi/drivers/rti800.c b/drivers/staging/comedi/drivers/rti800.c
index b9cf74c..dc81132 100644
--- a/drivers/staging/comedi/drivers/rti800.c
+++ b/drivers/staging/comedi/drivers/rti800.c
@@ -125,11 +125,20 @@ static const struct comedi_lrange range_rti800_ai_unipolar = {
 };
 
 struct rti800_board {
-
 	const char *name;
 	int has_ao;
 };
 
+static const struct rti800_board rti800_boardtypes[] = {
+	{
+		.name		= "rti800",
+		.has_ao		= 0,
+	}, {
+		.name		= "rti815",
+		.has_ao		= 1,
+	},
+};
+
 struct rti800_private {
 	enum {
 		adc_diff, adc_pseudodiff, adc_singleended
@@ -438,18 +447,13 @@ static void rti800_detach(struct comedi_device *dev)
 		free_irq(dev->irq, dev);
 }
 
-static const struct rti800_board boardtypes[] = {
-	{ "rti800", 0 },
-	{ "rti815", 1 },
-};
-
 static struct comedi_driver rti800_driver = {
 	.driver_name	= "rti800",
 	.module		= THIS_MODULE,
 	.attach		= rti800_attach,
 	.detach		= rti800_detach,
-	.num_names	= ARRAY_SIZE(boardtypes),
-	.board_name	= &boardtypes[0].name,
+	.num_names	= ARRAY_SIZE(rti800_boardtypes),
+	.board_name	= &rti800_boardtypes[0].name,
 	.offset		= sizeof(struct rti800_board),
 };
 module_comedi_driver(rti800_driver);
-- 
1.8.1.4

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux