Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933029AbbFERbV (ORCPT ); Fri, 5 Jun 2015 13:31:21 -0400 Received: from smtp81.iad3a.emailsrvr.com ([173.203.187.81]:46329 "EHLO smtp81.iad3a.emailsrvr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933002AbbFERbR (ORCPT ); Fri, 5 Jun 2015 13:31:17 -0400 X-Sender-Id: abbotti@mev.co.uk From: Ian Abbott To: Cc: Greg Kroah-Hartman , Ian Abbott , H Hartley Sweeten , Subject: [PATCH 27/32] staging: comedi: das08: rename the gainlist variables Date: Fri, 5 Jun 2015 18:30:30 +0100 Message-Id: <1433525435-12986-28-git-send-email-abbotti@mev.co.uk> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1433525435-12986-1-git-send-email-abbotti@mev.co.uk> References: <1433525435-12986-1-git-send-email-abbotti@mev.co.uk> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2406 Lines: 59 `das08_pgh_gainlist[]`, `das08_pgl_gainlist[]`, and `das08_pgm_gainlist[]` hold the gain codes indexed by range index for various boards that support programmable gain. `das08_gainlist[]` is a look-up table to find the appropriate gain list for a board. These are all associated with the analog input Comedi subdevice. Rename the variables to reflect that. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/das08.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/staging/comedi/drivers/das08.c b/drivers/staging/comedi/drivers/das08.c index 9f2113c..ec0998b 100644 --- a/drivers/staging/comedi/drivers/das08.c +++ b/drivers/staging/comedi/drivers/das08.c @@ -147,18 +147,18 @@ static const struct comedi_lrange *const das08_ai_lranges[] = { [das08_pgm] = &das08_pgm_ai_range, }; -static const int das08_pgh_gainlist[] = { +static const int das08_pgh_ai_gainlist[] = { 8, 0, 10, 2, 12, 4, 14, 6, 1, 3, 5, 7 }; -static const int das08_pgl_gainlist[] = { 8, 0, 2, 4, 6, 1, 3, 5, 7 }; -static const int das08_pgm_gainlist[] = { 8, 0, 10, 12, 14, 9, 11, 13, 15 }; +static const int das08_pgl_ai_gainlist[] = { 8, 0, 2, 4, 6, 1, 3, 5, 7 }; +static const int das08_pgm_ai_gainlist[] = { 8, 0, 10, 12, 14, 9, 11, 13, 15 }; -static const int *const das08_gainlists[] = { +static const int *const das08_ai_gainlists[] = { [das08_pg_none] = NULL, [das08_bipolar5] = NULL, - [das08_pgh] = das08_pgh_gainlist, - [das08_pgl] = das08_pgl_gainlist, - [das08_pgm] = das08_pgm_gainlist, + [das08_pgh] = das08_pgh_ai_gainlist, + [das08_pgl] = das08_pgl_ai_gainlist, + [das08_pgm] = das08_pgm_ai_gainlist, }; static int das08_ai_eoc(struct comedi_device *dev, @@ -365,7 +365,7 @@ int das08_common_attach(struct comedi_device *dev, unsigned long iobase) s->maxdata = (1 << thisboard->ai_nbits) - 1; s->range_table = das08_ai_lranges[thisboard->ai_pg]; s->insn_read = das08_ai_rinsn; - devpriv->pg_gainlist = das08_gainlists[thisboard->ai_pg]; + devpriv->pg_gainlist = das08_ai_gainlists[thisboard->ai_pg]; } else { s->type = COMEDI_SUBD_UNUSED; } -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/