From patchwork Tue Mar 7 22:45:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 65915 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp4345wrd; Tue, 7 Mar 2023 14:49:15 -0800 (PST) X-Google-Smtp-Source: AK7set9Y6iCWIaX52VeAfM/0XUDP36c/fQ7lGaRpssLgY9fU64A55GM6xJk0S6FrgJPj44KVwFei X-Received: by 2002:a17:902:c94c:b0:19b:33c0:4091 with SMTP id i12-20020a170902c94c00b0019b33c04091mr21305695pla.52.1678229355133; Tue, 07 Mar 2023 14:49:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678229355; cv=none; d=google.com; s=arc-20160816; b=EL1WBBF3KZ5cSW8+FAyrsz5iDGgFO9JTpFLETea2zD47UCqwjfBQjSwCEldnXUNvRa lC3JzaEnyZllt61YPUUt1Db3JRK1y5WWWxshgooCCl2AG0FgJzU3WwOqp6y30zpLYyPI Tb2/WZOoEJMRE1AGYggFijKeD6XQgS5zYysXkAFAIlG0ac4EzMOgEyC2fBZhHUKC/uO/ 2zxLk/sv7A6WW7cbEWyM0ke/JSKuyEJ3nJu6Q84m1ggMPUjnj60z2qh2a5i0NeUGHyWR HLIKktpUTR1EzVlBSw+2OTin59t/aZ4axI3XvSg9SHVVEbuW+n8RfsC8qdigVmQcw+t6 LoiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=BJaFizK7ymwNJHCqOVUsvQBF9BnMWHZEj4L9E1Liumc=; b=JNViNUJ/AdzATRHMR/wC1NpJcB10/4tr6kwFG8BbzJAA2B2EvqXkYXOJKO5alwobNv To5Cj4dXQibmGUF2MZZrI9pjLUw5x1rc8rHmSic7cnJy2YSsCqG6n/+rnjVp47ub3W0F pF8jWYRIDinEBymSMRr6Y2zRO5O/IzAILk0mjVD9Qj8ZWXRd3o/s/ruXJRT99XTXkfFr 9AUEK1lyJKnsQMtvnPf6y8Ewdj95x6HaBkYHVXZeUeg5a3rLhC72UUHCoPaZ2QOmTo5Y yX1Hz+l2OZTV1W6DIj7IiAmmQIpGS27Ll8R6fo14SfF8L2Mb+AJ+kBCVUKHo9ww9BQxW edLA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jx8-20020a170903138800b0019cd71b56cbsi11888228plb.522.2023.03.07.14.49.01; Tue, 07 Mar 2023 14:49:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231618AbjCGWrV (ORCPT + 99 others); Tue, 7 Mar 2023 17:47:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33250 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229772AbjCGWrB (ORCPT ); Tue, 7 Mar 2023 17:47:01 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3E2A57288; Tue, 7 Mar 2023 14:46:49 -0800 (PST) Received: from gsql.ggedos.sk (off-20.infotel.telecom.sk [212.5.213.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by hosting.gsystem.sk (Postfix) with ESMTPSA id 3CBE07A05AB; Tue, 7 Mar 2023 23:46:48 +0100 (CET) From: Ondrej Zary To: Damien Le Moal , Sudip Mukherjee Cc: Christoph Hellwig , Sergey Shtylyov , Jens Axboe , Tim Waugh , linux-block@vger.kernel.org, linux-parport@lists.infradead.org, linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 04/32] pata_parport-bpck6: pass around struct pi_adapter * Date: Tue, 7 Mar 2023 23:45:59 +0100 Message-Id: <20230307224627.28011-5-linux@zary.sk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230307224627.28011-1-linux@zary.sk> References: <20230307224627.28011-1-linux@zary.sk> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759751024178161504?= X-GMAIL-MSGID: =?utf-8?q?1759751024178161504?= Remove Interface typedef, pass around struct pi_adapter * down to all functions instead. Remove PPCSTRUCT define. Signed-off-by: Ondrej Zary Reviewed-by: Sergey Shtylyov Reviewed-by: Sergey Shtylyov --- drivers/ata/pata_parport/bpck6.c | 43 ++++----- drivers/ata/pata_parport/ppc6lnx.c | 139 +++++++++++++++-------------- 2 files changed, 96 insertions(+), 86 deletions(-) diff --git a/drivers/ata/pata_parport/bpck6.c b/drivers/ata/pata_parport/bpck6.c index fa1f7d4fe3cb..bc128a2c444e 100644 --- a/drivers/ata/pata_parport/bpck6.c +++ b/drivers/ata/pata_parport/bpck6.c @@ -18,67 +18,67 @@ #include #include #include -#include "ppc6lnx.c" #include "pata_parport.h" - -#define PPCSTRUCT(pi) ((Interface *)(pi->private)) +#include "ppc6lnx.c" static int bpck6_read_regr(struct pi_adapter *pi, int cont, int reg) { - return ppc6_rd_port(PPCSTRUCT(pi), cont?reg|8:reg); + return ppc6_rd_port(pi, cont?reg|8:reg); } static void bpck6_write_regr(struct pi_adapter *pi, int cont, int reg, int val) { - ppc6_wr_port(PPCSTRUCT(pi), cont?reg|8:reg, val); + ppc6_wr_port(pi, cont?reg|8:reg, val); } static void bpck6_write_block(struct pi_adapter *pi, char *buf, int len) { - ppc6_wr_port16_blk(PPCSTRUCT(pi), ATA_REG_DATA, buf, (u32)len>>1); + ppc6_wr_port16_blk(pi, ATA_REG_DATA, buf, (u32)len>>1); } static void bpck6_read_block(struct pi_adapter *pi, char *buf, int len) { - ppc6_rd_port16_blk(PPCSTRUCT(pi), ATA_REG_DATA, buf, (u32)len>>1); + ppc6_rd_port16_blk(pi, ATA_REG_DATA, buf, (u32)len>>1); } static void bpck6_connect(struct pi_adapter *pi) { + struct ppc_storage *ppc = (void *)(pi->private); dev_dbg(&pi->dev, "connect\n"); if(pi->mode >=2) { - PPCSTRUCT(pi)->mode=4+pi->mode-2; + ppc->mode = 4+pi->mode-2; } else if(pi->mode==1) { - PPCSTRUCT(pi)->mode=3; + ppc->mode = 3; } else { - PPCSTRUCT(pi)->mode=1; + ppc->mode = 1; } - ppc6_open(PPCSTRUCT(pi)); - ppc6_wr_extout(PPCSTRUCT(pi),0x3); + ppc6_open(pi); + ppc6_wr_extout(pi, 0x3); } static void bpck6_disconnect(struct pi_adapter *pi) { dev_dbg(&pi->dev, "disconnect\n"); - ppc6_wr_extout(PPCSTRUCT(pi),0x0); - ppc6_close(PPCSTRUCT(pi)); + ppc6_wr_extout(pi, 0x0); + ppc6_close(pi); } static int bpck6_test_port(struct pi_adapter *pi) /* check for 8-bit port */ { + struct ppc_storage *ppc = (void *)(pi->private); dev_dbg(&pi->dev, "PARPORT indicates modes=%x for lp=0x%lx\n", pi->pardev->port->modes, pi->pardev->port->base); /*copy over duplicate stuff.. initialize state info*/ - PPCSTRUCT(pi)->ppc_id=pi->unit; - PPCSTRUCT(pi)->lpt_addr=pi->port; + ppc->ppc_id = pi->unit; + ppc->lpt_addr = pi->port; /* look at the parport device to see what modes we can use */ if (pi->pardev->port->modes & PARPORT_MODE_EPP) @@ -90,23 +90,24 @@ static int bpck6_test_port(struct pi_adapter *pi) /* check for 8-bit port */ static int bpck6_probe_unit(struct pi_adapter *pi) { + struct ppc_storage *ppc = (void *)(pi->private); int out; dev_dbg(&pi->dev, "PROBE UNIT %x on port:%x\n", pi->unit, pi->port); /*SET PPC UNIT NUMBER*/ - PPCSTRUCT(pi)->ppc_id=pi->unit; + ppc->ppc_id = pi->unit; /*LOWER DOWN TO UNIDIRECTIONAL*/ - PPCSTRUCT(pi)->mode=1; + ppc->mode = 1; - out=ppc6_open(PPCSTRUCT(pi)); + out = ppc6_open(pi); dev_dbg(&pi->dev, "ppc_open returned %2x\n", out); if(out) { - ppc6_close(PPCSTRUCT(pi)); + ppc6_close(pi); dev_dbg(&pi->dev, "leaving probe\n"); return(1); } @@ -128,7 +129,7 @@ static void bpck6_log_adapter(struct pi_adapter *pi) static int bpck6_init_proto(struct pi_adapter *pi) { - Interface *p = kzalloc(sizeof(Interface), GFP_KERNEL); + struct ppc_storage *p = kzalloc(sizeof(struct ppc_storage), GFP_KERNEL); if (p) { pi->private = (unsigned long)p; diff --git a/drivers/ata/pata_parport/ppc6lnx.c b/drivers/ata/pata_parport/ppc6lnx.c index 5e5521d3b1dd..f12bb019fc61 100644 --- a/drivers/ata/pata_parport/ppc6lnx.c +++ b/drivers/ata/pata_parport/ppc6lnx.c @@ -64,7 +64,7 @@ //*************************************************************************** -typedef struct ppc_storage { +struct ppc_storage { u16 lpt_addr; // LPT base address u8 ppc_id; u8 mode; // operating mode @@ -79,7 +79,7 @@ typedef struct ppc_storage { u8 org_data; // original LPT data port contents u8 org_ctrl; // original LPT control port contents u8 cur_ctrl; // current control port contents -} Interface; +}; //*************************************************************************** @@ -101,26 +101,27 @@ typedef struct ppc_storage { //*************************************************************************** -static int ppc6_select(Interface *ppc); -static void ppc6_deselect(Interface *ppc); -static void ppc6_send_cmd(Interface *ppc, u8 cmd); -static void ppc6_wr_data_byte(Interface *ppc, u8 data); -static u8 ppc6_rd_data_byte(Interface *ppc); -static u8 ppc6_rd_port(Interface *ppc, u8 port); -static void ppc6_wr_port(Interface *ppc, u8 port, u8 data); -static void ppc6_rd_data_blk(Interface *ppc, u8 *data, long count); -static void ppc6_wait_for_fifo(Interface *ppc); -static void ppc6_wr_data_blk(Interface *ppc, u8 *data, long count); -static void ppc6_rd_port16_blk(Interface *ppc, u8 port, u8 *data, long length); -static void ppc6_wr_port16_blk(Interface *ppc, u8 port, u8 *data, long length); -static void ppc6_wr_extout(Interface *ppc, u8 regdata); -static int ppc6_open(Interface *ppc); -static void ppc6_close(Interface *ppc); +static int ppc6_select(struct pi_adapter *pi); +static void ppc6_deselect(struct pi_adapter *pi); +static void ppc6_send_cmd(struct pi_adapter *pi, u8 cmd); +static void ppc6_wr_data_byte(struct pi_adapter *pi, u8 data); +static u8 ppc6_rd_data_byte(struct pi_adapter *pi); +static u8 ppc6_rd_port(struct pi_adapter *pi, u8 port); +static void ppc6_wr_port(struct pi_adapter *pi, u8 port, u8 data); +static void ppc6_rd_data_blk(struct pi_adapter *pi, u8 *data, long count); +static void ppc6_wait_for_fifo(struct pi_adapter *pi); +static void ppc6_wr_data_blk(struct pi_adapter *pi, u8 *data, long count); +static void ppc6_rd_port16_blk(struct pi_adapter *pi, u8 port, u8 *data, long length); +static void ppc6_wr_port16_blk(struct pi_adapter *pi, u8 port, u8 *data, long length); +static void ppc6_wr_extout(struct pi_adapter *pi, u8 regdata); +static int ppc6_open(struct pi_adapter *pi); +static void ppc6_close(struct pi_adapter *pi); //*************************************************************************** -static int ppc6_select(Interface *ppc) +static int ppc6_select(struct pi_adapter *pi) { + struct ppc_storage *ppc = (void *)(pi->private); u8 i, j, k; i = inb(ppc->lpt_addr + 1); @@ -205,8 +206,9 @@ static int ppc6_select(Interface *ppc) //*************************************************************************** -static void ppc6_deselect(Interface *ppc) +static void ppc6_deselect(struct pi_adapter *pi) { + struct ppc_storage *ppc = (void *)(pi->private); if (ppc->mode & 4) // EPP ppc->cur_ctrl |= port_init; else // PPC/ECP @@ -223,8 +225,9 @@ static void ppc6_deselect(Interface *ppc) //*************************************************************************** -static void ppc6_send_cmd(Interface *ppc, u8 cmd) +static void ppc6_send_cmd(struct pi_adapter *pi, u8 cmd) { + struct ppc_storage *ppc = (void *)(pi->private); switch(ppc->mode) { case PPCMODE_UNI_SW : @@ -254,8 +257,9 @@ static void ppc6_send_cmd(Interface *ppc, u8 cmd) //*************************************************************************** -static void ppc6_wr_data_byte(Interface *ppc, u8 data) +static void ppc6_wr_data_byte(struct pi_adapter *pi, u8 data) { + struct ppc_storage *ppc = (void *)(pi->private); switch(ppc->mode) { case PPCMODE_UNI_SW : @@ -285,8 +289,9 @@ static void ppc6_wr_data_byte(Interface *ppc, u8 data) //*************************************************************************** -static u8 ppc6_rd_data_byte(Interface *ppc) +static u8 ppc6_rd_data_byte(struct pi_adapter *pi) { + struct ppc_storage *ppc = (void *)(pi->private); u8 data = 0; switch(ppc->mode) @@ -358,26 +363,27 @@ static u8 ppc6_rd_data_byte(Interface *ppc) //*************************************************************************** -static u8 ppc6_rd_port(Interface *ppc, u8 port) +static u8 ppc6_rd_port(struct pi_adapter *pi, u8 port) { - ppc6_send_cmd(ppc,(u8)(port | ACCESS_PORT | ACCESS_READ)); + ppc6_send_cmd(pi, port | ACCESS_PORT | ACCESS_READ); - return(ppc6_rd_data_byte(ppc)); + return ppc6_rd_data_byte(pi); } //*************************************************************************** -static void ppc6_wr_port(Interface *ppc, u8 port, u8 data) +static void ppc6_wr_port(struct pi_adapter *pi, u8 port, u8 data) { - ppc6_send_cmd(ppc,(u8)(port | ACCESS_PORT | ACCESS_WRITE)); + ppc6_send_cmd(pi, port | ACCESS_PORT | ACCESS_WRITE); - ppc6_wr_data_byte(ppc, data); + ppc6_wr_data_byte(pi, data); } //*************************************************************************** -static void ppc6_rd_data_blk(Interface *ppc, u8 *data, long count) +static void ppc6_rd_data_blk(struct pi_adapter *pi, u8 *data, long count) { + struct ppc_storage *ppc = (void *)(pi->private); switch(ppc->mode) { case PPCMODE_UNI_SW : @@ -512,8 +518,9 @@ static void ppc6_rd_data_blk(Interface *ppc, u8 *data, long count) //*************************************************************************** -static void ppc6_wait_for_fifo(Interface *ppc) +static void ppc6_wait_for_fifo(struct pi_adapter *pi) { + struct ppc_storage *ppc = (void *)(pi->private); int i; if (ppc->ppc_flags & fifo_wait) @@ -525,8 +532,9 @@ static void ppc6_wait_for_fifo(Interface *ppc) //*************************************************************************** -static void ppc6_wr_data_blk(Interface *ppc, u8 *data, long count) +static void ppc6_wr_data_blk(struct pi_adapter *pi, u8 *data, long count) { + struct ppc_storage *ppc = (void *)(pi->private); switch(ppc->mode) { case PPCMODE_UNI_SW : @@ -549,7 +557,7 @@ static void ppc6_wr_data_blk(Interface *ppc, u8 *data, long count) { u8 this, last; - ppc6_send_cmd(ppc,(CMD_PREFIX_SET | PREFIX_FASTWR)); + ppc6_send_cmd(pi, CMD_PREFIX_SET | PREFIX_FASTWR); ppc->cur_ctrl |= port_stb; @@ -582,7 +590,7 @@ static void ppc6_wr_data_blk(Interface *ppc, u8 *data, long count) outb(ppc->cur_ctrl, ppc->lpt_addr + 2); - ppc6_send_cmd(ppc,(CMD_PREFIX_RESET | PREFIX_FASTWR)); + ppc6_send_cmd(pi, CMD_PREFIX_RESET | PREFIX_FASTWR); break; } @@ -595,7 +603,7 @@ static void ppc6_wr_data_blk(Interface *ppc, u8 *data, long count) count--; } - ppc6_wait_for_fifo(ppc); + ppc6_wait_for_fifo(pi); break; } @@ -615,7 +623,7 @@ static void ppc6_wr_data_blk(Interface *ppc, u8 *data, long count) count--; } - ppc6_wait_for_fifo(ppc); + ppc6_wait_for_fifo(pi); break; } @@ -635,7 +643,7 @@ static void ppc6_wr_data_blk(Interface *ppc, u8 *data, long count) count--; } - ppc6_wait_for_fifo(ppc); + ppc6_wait_for_fifo(pi); break; } @@ -644,72 +652,73 @@ static void ppc6_wr_data_blk(Interface *ppc, u8 *data, long count) //*************************************************************************** -static void ppc6_rd_port16_blk(Interface *ppc, u8 port, u8 *data, long length) +static void ppc6_rd_port16_blk(struct pi_adapter *pi, u8 port, u8 *data, long length) { length = length << 1; - ppc6_send_cmd(ppc, (REG_BLKSIZE | ACCESS_REG | ACCESS_WRITE)); - ppc6_wr_data_byte(ppc,(u8)length); - ppc6_wr_data_byte(ppc,(u8)(length >> 8)); - ppc6_wr_data_byte(ppc,0); + ppc6_send_cmd(pi, REG_BLKSIZE | ACCESS_REG | ACCESS_WRITE); + ppc6_wr_data_byte(pi, (u8)length); + ppc6_wr_data_byte(pi, (u8)(length >> 8)); + ppc6_wr_data_byte(pi, 0); - ppc6_send_cmd(ppc, (CMD_PREFIX_SET | PREFIX_IO16 | PREFIX_BLK)); + ppc6_send_cmd(pi, CMD_PREFIX_SET | PREFIX_IO16 | PREFIX_BLK); - ppc6_send_cmd(ppc, (u8)(port | ACCESS_PORT | ACCESS_READ)); + ppc6_send_cmd(pi, port | ACCESS_PORT | ACCESS_READ); - ppc6_rd_data_blk(ppc, data, length); + ppc6_rd_data_blk(pi, data, length); - ppc6_send_cmd(ppc, (CMD_PREFIX_RESET | PREFIX_IO16 | PREFIX_BLK)); + ppc6_send_cmd(pi, CMD_PREFIX_RESET | PREFIX_IO16 | PREFIX_BLK); } //*************************************************************************** -static void ppc6_wr_port16_blk(Interface *ppc, u8 port, u8 *data, long length) +static void ppc6_wr_port16_blk(struct pi_adapter *pi, u8 port, u8 *data, long length) { length = length << 1; - ppc6_send_cmd(ppc, (REG_BLKSIZE | ACCESS_REG | ACCESS_WRITE)); - ppc6_wr_data_byte(ppc,(u8)length); - ppc6_wr_data_byte(ppc,(u8)(length >> 8)); - ppc6_wr_data_byte(ppc,0); + ppc6_send_cmd(pi, REG_BLKSIZE | ACCESS_REG | ACCESS_WRITE); + ppc6_wr_data_byte(pi, (u8)length); + ppc6_wr_data_byte(pi, (u8)(length >> 8)); + ppc6_wr_data_byte(pi, 0); - ppc6_send_cmd(ppc, (CMD_PREFIX_SET | PREFIX_IO16 | PREFIX_BLK)); + ppc6_send_cmd(pi, CMD_PREFIX_SET | PREFIX_IO16 | PREFIX_BLK); - ppc6_send_cmd(ppc, (u8)(port | ACCESS_PORT | ACCESS_WRITE)); + ppc6_send_cmd(pi, port | ACCESS_PORT | ACCESS_WRITE); - ppc6_wr_data_blk(ppc, data, length); + ppc6_wr_data_blk(pi, data, length); - ppc6_send_cmd(ppc, (CMD_PREFIX_RESET | PREFIX_IO16 | PREFIX_BLK)); + ppc6_send_cmd(pi, CMD_PREFIX_RESET | PREFIX_IO16 | PREFIX_BLK); } //*************************************************************************** -static void ppc6_wr_extout(Interface *ppc, u8 regdata) +static void ppc6_wr_extout(struct pi_adapter *pi, u8 regdata) { - ppc6_send_cmd(ppc,(REG_VERSION | ACCESS_REG | ACCESS_WRITE)); + ppc6_send_cmd(pi, REG_VERSION | ACCESS_REG | ACCESS_WRITE); - ppc6_wr_data_byte(ppc, (u8)((regdata & 0x03) << 6)); + ppc6_wr_data_byte(pi, (u8)((regdata & 0x03) << 6)); } //*************************************************************************** -static int ppc6_open(Interface *ppc) +static int ppc6_open(struct pi_adapter *pi) { + struct ppc_storage *ppc = (void *)(pi->private); int ret; - ret = ppc6_select(ppc); + ret = ppc6_select(pi); if (ret == 0) return(ret); ppc->ppc_flags &= ~fifo_wait; - ppc6_send_cmd(ppc, (ACCESS_REG | ACCESS_WRITE | REG_RAMSIZE)); - ppc6_wr_data_byte(ppc, RAMSIZE_128K); + ppc6_send_cmd(pi, ACCESS_REG | ACCESS_WRITE | REG_RAMSIZE); + ppc6_wr_data_byte(pi, RAMSIZE_128K); - ppc6_send_cmd(ppc, (ACCESS_REG | ACCESS_READ | REG_VERSION)); + ppc6_send_cmd(pi, ACCESS_REG | ACCESS_READ | REG_VERSION); - if ((ppc6_rd_data_byte(ppc) & 0x3F) == 0x0C) + if ((ppc6_rd_data_byte(pi) & 0x3F) == 0x0C) ppc->ppc_flags |= fifo_wait; return(ret); @@ -717,9 +726,9 @@ static int ppc6_open(Interface *ppc) //*************************************************************************** -static void ppc6_close(Interface *ppc) +static void ppc6_close(struct pi_adapter *pi) { - ppc6_deselect(ppc); + ppc6_deselect(pi); } //***************************************************************************