From: David Sterba <dsterba@suse.cz>
To: Dominik Brodowski <linux@dominikbrodowski.net>
Cc: linux-pcmcia@lists.infradead.org, linux-serial@vger.kernel.org,
Russell King <rmk+kernel@arm.linux.org.uk>,
David Sterba <dsterba@suse.cz>
Subject: Re: [PATCH 18/39] pcmcia: remove remaining in-kernel pcmcia_get_configuration_info() users
Date: Tue, 19 Aug 2008 11:06:31 +0200 [thread overview]
Message-ID: <20080819090631.GA11115@ds.suse.cz> (raw)
In-Reply-To: <1219085610-12289-18-git-send-email-linux@dominikbrodowski.net>
On Mon, Aug 18, 2008 at 08:53:09PM +0200, Dominik Brodowski wrote:
> Remove the three remaining pcmcia_get_configuration_info() users:
> - pcmciamtd is marked broken anyway.
> - serial_cs.c can access the relevant structs directly
> - ipwireless didn't use the output
>
> CC: linux-serial@vger.kernel.org
> CC: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: David Sterba <dsterba@suse.cz>
> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
> ---
> drivers/char/pcmcia/ipwireless/main.c | 10 ----------
> drivers/mtd/maps/pcmciamtd.c | 12 +-----------
> drivers/serial/serial_cs.c | 18 +++++++++---------
> 3 files changed, 10 insertions(+), 30 deletions(-)
>
> diff --git a/drivers/char/pcmcia/ipwireless/main.c b/drivers/char/pcmcia/ipwireless/main.c
> index 5eca7a9..1f520e5 100644
> --- a/drivers/char/pcmcia/ipwireless/main.c
> +++ b/drivers/char/pcmcia/ipwireless/main.c
> @@ -83,7 +83,6 @@ static int config_ipwireless(struct ipw_dev *ipw)
> {
> struct pcmcia_device *link = ipw->link;
> int ret;
> - config_info_t conf;
> tuple_t tuple;
> unsigned short buf[64];
> cisparse_t parse;
> @@ -297,15 +296,6 @@ static int config_ipwireless(struct ipw_dev *ipw)
> goto exit3;
> }
>
> - /* Look up current Vcc */
> -
> - ret = pcmcia_get_configuration_info(link, &conf);
> -
> - if (ret != CS_SUCCESS) {
> - cs_error(link, GetConfigurationInfo, ret);
> - goto exit4;
> - }
> -
> printk(KERN_INFO IPWIRELESS_PCCARD_NAME ": Card type %s\n",
> ipw->is_v2_card ? "V2/V3" : "V1");
> printk(KERN_INFO IPWIRELESS_PCCARD_NAME
> diff --git a/drivers/mtd/maps/pcmciamtd.c b/drivers/mtd/maps/pcmciamtd.c
> index 90924fb..8861ca4 100644
> --- a/drivers/mtd/maps/pcmciamtd.c
> +++ b/drivers/mtd/maps/pcmciamtd.c
> @@ -493,7 +493,6 @@ static int pcmciamtd_config(struct pcmcia_device *link)
> int last_ret = 0, last_fn = 0;
> int ret;
> int i;
> - config_info_t t;
> static char *probes[] = { "jedec_probe", "cfi_probe" };
> int new_name = 0;
>
> @@ -571,10 +570,7 @@ static int pcmciamtd_config(struct pcmcia_device *link)
> dev->pcmcia_map.map_priv_1 = (unsigned long)dev;
> dev->pcmcia_map.map_priv_2 = (unsigned long)link->win;
>
> - DEBUG(2, "Getting configuration");
> - CS_CHECK(GetConfigurationInfo, pcmcia_get_configuration_info(link, &t));
> - DEBUG(2, "Vcc = %d Vpp1 = %d Vpp2 = %d", t.Vcc, t.Vpp1, t.Vpp2);
> - dev->vpp = (vpp) ? vpp : t.Vpp1;
> + dev->vpp = (vpp) ? vpp : link->socket.socket.Vpp;
> link->conf.Attributes = 0;
> if(setvpp == 2) {
> link->conf.Vpp = dev->vpp;
> @@ -583,13 +579,7 @@ static int pcmciamtd_config(struct pcmcia_device *link)
> }
>
> link->conf.IntType = INT_MEMORY;
> - link->conf.ConfigBase = t.ConfigBase;
> - link->conf.Status = t.Status;
> - link->conf.Pin = t.Pin;
> - link->conf.Copy = t.Copy;
> - link->conf.ExtStatus = t.ExtStatus;
> link->conf.ConfigIndex = 0;
> - link->conf.Present = t.Present;
> DEBUG(2, "Setting Configuration");
> ret = pcmcia_request_configuration(link, &link->conf);
> if(ret != CS_SUCCESS) {
> diff --git a/drivers/serial/serial_cs.c b/drivers/serial/serial_cs.c
> index 2427eee..4fed877 100644
> --- a/drivers/serial/serial_cs.c
> +++ b/drivers/serial/serial_cs.c
> @@ -488,23 +488,23 @@ static int simple_config_check_notpicky(struct pcmcia_device *p_dev,
> static int simple_config(struct pcmcia_device *link)
> {
> struct serial_info *info = link->priv;
> - config_info_t config;
> - int i, try;
> + int i = -ENODEV, try;
>
> /* If the card is already configured, look up the port and irq */
> - i = pcmcia_get_configuration_info(link, &config);
> - if ((i == CS_SUCCESS) && (config.Attributes & CONF_VALID_CLIENT)) {
> + if (link->function_config) {
> unsigned int port = 0;
> - if ((config.BasePort2 != 0) && (config.NumPorts2 == 8)) {
> - port = config.BasePort2;
> + if ((link->io.BasePort2 != 0) &&
> + (link->io.NumPorts2 == 8)) {
> + port = link->io.BasePort2;
> info->slave = 1;
> } else if ((info->manfid == MANFID_OSITECH) &&
> - (config.NumPorts1 == 0x40)) {
> - port = config.BasePort1 + 0x28;
> + (link->io.NumPorts1 == 0x40)) {
> + port = link->io.BasePort1 + 0x28;
> info->slave = 1;
> }
> if (info->slave) {
> - return setup_serial(link, info, port, config.AssignedIRQ);
> + return setup_serial(link, info, port,
> + link->irq.AssignedIRQ);
> }
> }
>
> --
> 1.5.4.3
>
next prev parent reply other threads:[~2008-08-19 9:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20080818185025.GA11647@comet.dominikbrodowski.net>
[not found] ` <20080818185025.GA11647-S7uyTPAaJ/sb6pqDj42GsMgv3T4z79SOrE5yTffgRl4@public.gmane.org>
2008-08-18 18:53 ` [PATCH 14/39] pcmcia: use pcmcia_loop_config in misc pcmcia drivers Dominik Brodowski
2008-08-21 9:57 ` Harald Welte
2008-08-18 18:53 ` [PATCH 18/39] pcmcia: remove remaining in-kernel pcmcia_get_configuration_info() users Dominik Brodowski
2008-08-19 9:06 ` David Sterba [this message]
2008-08-18 18:53 ` [PATCH 31/39] pcmcia: deprecate CS_NO_MORE_ITEMS Dominik Brodowski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080819090631.GA11115@ds.suse.cz \
--to=dsterba@suse.cz \
--cc=linux-pcmcia@lists.infradead.org \
--cc=linux-serial@vger.kernel.org \
--cc=linux@dominikbrodowski.net \
--cc=rmk+kernel@arm.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox