Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757268AbbIURxO (ORCPT ); Mon, 21 Sep 2015 13:53:14 -0400 Received: from smtp89.iad3a.emailsrvr.com ([173.203.187.89]:34059 "EHLO smtp89.iad3a.emailsrvr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753836AbbIURxL (ORCPT ); Mon, 21 Sep 2015 13:53:11 -0400 X-Sender-Id: abbotti@mev.co.uk From: Ian Abbott To: Cc: Greg Kroah-Hartman , Ian Abbott , H Hartley Sweeten , Subject: [PATCH 02/11] staging: comedi: comedidev.h: use enum for COMEDI_CB_... constants Date: Mon, 21 Sep 2015 18:52:47 +0100 Message-Id: <1442857976-32692-3-git-send-email-abbotti@mev.co.uk> X-Mailer: git-send-email 2.5.1 In-Reply-To: <1442857976-32692-1-git-send-email-abbotti@mev.co.uk> References: <1442857976-32692-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 The existing constants `COMEDI_CB_EOS` etc. are in the form of macros and have a bogus kernel-doc comment. Change them to `enum` constants so they can be documented properly with kernel-doc. Signed-off-by: Ian Abbott --- drivers/staging/comedi/comedidev.h | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/drivers/staging/comedi/comedidev.h b/drivers/staging/comedi/comedidev.h index 097c3d5..76a1b93 100644 --- a/drivers/staging/comedi/comedidev.h +++ b/drivers/staging/comedi/comedidev.h @@ -216,26 +216,27 @@ struct comedi_async { }; /** - * comedi_async callback "events" + * enum comedi_cb - &struct comedi_async callback "events" * @COMEDI_CB_EOS: end-of-scan * @COMEDI_CB_EOA: end-of-acquisition/output * @COMEDI_CB_BLOCK: data has arrived, wakes up read() / write() * @COMEDI_CB_EOBUF: DEPRECATED: end of buffer * @COMEDI_CB_ERROR: card error during acquisition * @COMEDI_CB_OVERFLOW: buffer overflow/underflow - * * @COMEDI_CB_ERROR_MASK: events that indicate an error has occurred * @COMEDI_CB_CANCEL_MASK: events that will cancel an async command */ -#define COMEDI_CB_EOS BIT(0) -#define COMEDI_CB_EOA BIT(1) -#define COMEDI_CB_BLOCK BIT(2) -#define COMEDI_CB_EOBUF BIT(3) -#define COMEDI_CB_ERROR BIT(4) -#define COMEDI_CB_OVERFLOW BIT(5) - -#define COMEDI_CB_ERROR_MASK (COMEDI_CB_ERROR | COMEDI_CB_OVERFLOW) -#define COMEDI_CB_CANCEL_MASK (COMEDI_CB_EOA | COMEDI_CB_ERROR_MASK) +enum comedi_cb { + COMEDI_CB_EOS = BIT(0), + COMEDI_CB_EOA = BIT(1), + COMEDI_CB_BLOCK = BIT(2), + COMEDI_CB_EOBUF = BIT(3), + COMEDI_CB_ERROR = BIT(4), + COMEDI_CB_OVERFLOW = BIT(5), + /* masks */ + COMEDI_CB_ERROR_MASK = (COMEDI_CB_ERROR | COMEDI_CB_OVERFLOW), + COMEDI_CB_CANCEL_MASK = (COMEDI_CB_EOA | COMEDI_CB_ERROR_MASK) +}; struct comedi_driver { struct comedi_driver *next; -- 2.5.1