Commit c331e766 authored by Marek Belisko's avatar Marek Belisko Committed by Greg Kroah-Hartman

staging: ft1000-pcmcia: Fix compilation errors.

Following patch will fix all compilation errors. Main problems
was with pcmcia API changes. Also remove BROKEN as now driver
is properly build.
Signed-off-by: default avatarMarek Belisko <marek.belisko@open-nandra.com>
Signed-off-by: default avatarStano Lanci <chl.pixo@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 267024a9
......@@ -13,7 +13,7 @@ config FT1000_USB
config FT1000_PCMCIA
tristate "Driver for ft1000 pcmcia device."
depends on PCMCIA && BROKEN
depends on PCMCIA
depends on NET
help
Say Y if you want to have support for Flarion card also called
......
......@@ -310,7 +310,7 @@ USHORT hdr_checksum(PPSEUDO_HDR pHdr)
return chksum;
}
int card_download(struct net_device *dev, void *pFileStart, UINT FileLength)
int card_download(struct net_device *dev, const u8 *pFileStart, UINT FileLength)
{
FT1000_INFO *info = (PFT1000_INFO) netdev_priv(dev);
int Status = SUCCESS;
......
......@@ -43,6 +43,10 @@
#include <linux/firmware.h>
#include <linux/ethtool.h>
#include <pcmcia/cistpl.h>
#include <pcmcia/cisreg.h>
#include <pcmcia/ds.h>
#ifdef FT_DEBUG
#define DEBUG(n, args...) printk(KERN_DEBUG args);
#else
......@@ -53,7 +57,7 @@
#include "ft1000_dev.h"
#include "ft1000.h"
int card_download(struct net_device *dev, void *pFileStart, UINT FileLength);
int card_download(struct net_device *dev, const u8 *pFileStart, UINT FileLength);
void ft1000InitProc(struct net_device *dev);
void ft1000CleanupProc(struct net_device *dev);
......@@ -2148,13 +2152,11 @@ static const struct ethtool_ops ops = {
.get_link = ft1000_get_link
};
struct net_device *init_ft1000_card(unsigned short irq, int port,
unsigned char *mac_addr, void *ft1000_reset,
void *link, struct device *fdev)
struct net_device *init_ft1000_card(struct pcmcia_device *link,
void *ft1000_reset)
{
FT1000_INFO *info;
struct net_device *dev;
int i;
static const struct net_device_ops ft1000ops = // Slavius 21.10.2009 due to kernel changes
{
......@@ -2165,8 +2167,8 @@ struct net_device *init_ft1000_card(unsigned short irq, int port,
};
DEBUG(1, "ft1000_hw: init_ft1000_card()\n");
DEBUG(1, "ft1000_hw: irq = %d\n", irq);
DEBUG(1, "ft1000_hw: port = 0x%04x\n", port);
DEBUG(1, "ft1000_hw: irq = %d\n", link->irq);
DEBUG(1, "ft1000_hw: port = 0x%04x\n", link->resource[0]->start);
flarion_ft1000_cnt++;
......@@ -2184,7 +2186,7 @@ struct net_device *init_ft1000_card(unsigned short irq, int port,
return NULL;
}
SET_NETDEV_DEV(dev, fdev);
SET_NETDEV_DEV(dev, &link->dev);
info = netdev_priv(dev);
memset(info, 0, sizeof(FT1000_INFO));
......@@ -2227,15 +2229,13 @@ struct net_device *init_ft1000_card(unsigned short irq, int port,
DEBUG(0, "device name = %s\n", dev->name);
for (i = 0; i < 6; i++) {
dev->dev_addr[i] = mac_addr[i];
DEBUG(1, "ft1000_hw: mac_addr %d = 0x%02x\n", i, mac_addr[i]);
dev->irq = link->irq;
dev->base_addr = link->resource[0]->start;
if (pcmcia_get_mac_from_cis(link, dev)) {
printk(KERN_ERR "ft1000: Could not read mac address\n");
goto err_dev;
}
netif_stop_queue(dev);
dev->irq = irq;
dev->base_addr = port;
if (request_irq(dev->irq, ft1000_interrupt, IRQF_SHARED, dev->name, dev)) {
printk(KERN_ERR "ft1000: Could not request_irq\n");
goto err_dev;
......@@ -2254,13 +2254,13 @@ struct net_device *init_ft1000_card(unsigned short irq, int port,
info->AsicID = ft1000_read_reg(dev, FT1000_REG_ASIC_ID);
if (info->AsicID == ELECTRABUZZ_ID) {
DEBUG(0, "ft1000_hw: ELECTRABUZZ ASIC\n");
if (request_firmware(&fw_entry, "ft1000.img", fdev) != 0) {
if (request_firmware(&fw_entry, "ft1000.img", &link->dev) != 0) {
printk(KERN_INFO "ft1000: Could not open ft1000.img\n");
goto err_unreg;
}
} else {
DEBUG(0, "ft1000_hw: MAGNEMITE ASIC\n");
if (request_firmware(&fw_entry, "ft2000.img", fdev) != 0) {
if (request_firmware(&fw_entry, "ft2000.img", &link->dev) != 0) {
printk(KERN_INFO "ft1000: Could not open ft2000.img\n");
goto err_unreg;
}
......
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