Commit 8220c447 authored by Dominik Brodowski's avatar Dominik Brodowski Committed by Russell King

[PCMCIA] 09-pcmcia_compat.diff

Move the compatibility pcmcia_* functions which take a "handle" as
argument to a new file, pcmcia_compat.c, which is built into "ds"
a.k.a. "pcmcia.ko".  This makes sense as only 16-bit PCMCIA drivers
have a valid handle.
parent 7ea33fc9
......@@ -10,7 +10,7 @@ pcmcia_core-y += cs.o cistpl.o rsrc_mgr.o socket_sysfs.o
pcmcia_core-$(CONFIG_CARDBUS) += cardbus.o
obj-$(CONFIG_PCCARD) += pcmcia_core.o
pcmcia-y += ds.o bulkmem.o
pcmcia-y += ds.o bulkmem.o pcmcia_compat.o
obj-$(CONFIG_PCMCIA) += pcmcia.o
......
......@@ -1498,53 +1498,3 @@ int pccard_validate_cis(struct pcmcia_socket *s, unsigned int function, cisinfo_
return CS_SUCCESS;
}
EXPORT_SYMBOL(pccard_validate_cis);
/*
* Compatibility layer.
*/
int pcmcia_get_first_tuple(client_handle_t handle, tuple_t *tuple)
{
struct pcmcia_socket *s;
if (CHECK_HANDLE(handle))
return CS_BAD_HANDLE;
s = SOCKET(handle);
return pccard_get_first_tuple(s, handle->Function, tuple);
}
EXPORT_SYMBOL(pcmcia_get_first_tuple);
int pcmcia_get_next_tuple(client_handle_t handle, tuple_t *tuple)
{
struct pcmcia_socket *s;
if (CHECK_HANDLE(handle))
return CS_BAD_HANDLE;
s = SOCKET(handle);
return pccard_get_next_tuple(s, handle->Function, tuple);
}
EXPORT_SYMBOL(pcmcia_get_next_tuple);
int pcmcia_get_tuple_data(client_handle_t handle, tuple_t *tuple)
{
struct pcmcia_socket *s;
if (CHECK_HANDLE(handle))
return CS_BAD_HANDLE;
s = SOCKET(handle);
return pccard_get_tuple_data(s, tuple);
}
EXPORT_SYMBOL(pcmcia_get_tuple_data);
int pcmcia_parse_tuple(client_handle_t handle, tuple_t *tuple, cisparse_t *parse)
{
return pccard_parse_tuple(tuple, parse);
}
EXPORT_SYMBOL(pcmcia_parse_tuple);
int pcmcia_validate_cis(client_handle_t handle, cisinfo_t *info)
{
struct pcmcia_socket *s;
if (CHECK_HANDLE(handle))
return CS_BAD_HANDLE;
s = SOCKET(handle);
return pccard_validate_cis(s, handle->Function, info);
}
EXPORT_SYMBOL(pcmcia_validate_cis);
/*
* PCMCIA 16-bit compatibility functions
*
* The initial developer of the original code is David A. Hinds
* <dahinds@users.sourceforge.net>. Portions created by David A. Hinds
* are Copyright (C) 1999 David A. Hinds. All Rights Reserved.
*
* Copyright (C) 2004 Dominik Brodowski
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
*/
#include <linux/config.h>
#include <linux/module.h>
#include <linux/init.h>
#define IN_CARD_SERVICES
#include <pcmcia/version.h>
#include <pcmcia/cs_types.h>
#include <pcmcia/cs.h>
#include <pcmcia/bulkmem.h>
#include <pcmcia/cistpl.h>
#include <pcmcia/ds.h>
#include <pcmcia/ss.h>
#include "cs_internal.h"
int pcmcia_get_first_tuple(client_handle_t handle, tuple_t *tuple)
{
struct pcmcia_socket *s;
if (CHECK_HANDLE(handle))
return CS_BAD_HANDLE;
s = SOCKET(handle);
return pccard_get_first_tuple(s, handle->Function, tuple);
}
EXPORT_SYMBOL(pcmcia_get_first_tuple);
int pcmcia_get_next_tuple(client_handle_t handle, tuple_t *tuple)
{
struct pcmcia_socket *s;
if (CHECK_HANDLE(handle))
return CS_BAD_HANDLE;
s = SOCKET(handle);
return pccard_get_next_tuple(s, handle->Function, tuple);
}
EXPORT_SYMBOL(pcmcia_get_next_tuple);
int pcmcia_get_tuple_data(client_handle_t handle, tuple_t *tuple)
{
struct pcmcia_socket *s;
if (CHECK_HANDLE(handle))
return CS_BAD_HANDLE;
s = SOCKET(handle);
return pccard_get_tuple_data(s, tuple);
}
EXPORT_SYMBOL(pcmcia_get_tuple_data);
int pcmcia_parse_tuple(client_handle_t handle, tuple_t *tuple, cisparse_t *parse)
{
return pccard_parse_tuple(tuple, parse);
}
EXPORT_SYMBOL(pcmcia_parse_tuple);
int pcmcia_validate_cis(client_handle_t handle, cisinfo_t *info)
{
struct pcmcia_socket *s;
if (CHECK_HANDLE(handle))
return CS_BAD_HANDLE;
s = SOCKET(handle);
return pccard_validate_cis(s, handle->Function, info);
}
EXPORT_SYMBOL(pcmcia_validate_cis);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment