Commit 5a032163 authored by Alessandro Rubini's avatar Alessandro Rubini

backport: kernel/*.c: portability hacks

Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent 7b3e5a1d
......@@ -16,6 +16,7 @@
#include <linux/spinlock.h>
#include <linux/fmc.h>
#include <asm/uaccess.h>
#include "for-2.6.24.h"
static LIST_HEAD(fc_devices);
static DEFINE_SPINLOCK(fc_lock);
......
......@@ -13,6 +13,7 @@
#include <linux/init.h>
#include <linux/device.h>
#include <linux/fmc.h>
#include "for-2.6.24.h"
static int fmc_check_version(unsigned long version, const char *name)
{
......@@ -73,7 +74,7 @@ static void __fmc_release(struct device *dev){ }
/* This is needed as parent for our devices and dir in sysfs */
struct device fmc_bus = {
.release = __fmc_release,
.init_name = "fmc",
/* We can't set init_name, becase 2.6.26 and earlier miss it */
};
/*
......@@ -174,7 +175,7 @@ int fmc_device_register_n(struct fmc_device *fmcs, int n)
ret = device_add(&fmc->dev);
if (ret < 0) {
dev_err(fmc->hwdev, "Failed in registering \"%s\"\n",
fmc->dev.kobj.name);
dev_name(&fmc->dev));
fmc_free_id_info(fmc);
goto out;
}
......@@ -193,7 +194,6 @@ out:
kfree(fmcs->devarray);
for (i = 0, fmc = fmcs; i < n; i++, fmc++)
fmc->devarray = NULL;
fmc_free_id_info(fmc);
return ret;
}
......@@ -235,6 +235,7 @@ static int fmc_init(void)
{
int err;
dev_set_name(&fmc_bus, "fmc");
err = device_register(&fmc_bus);
if (err)
return err;
......
......@@ -13,6 +13,8 @@
#include <linux/fmc.h>
#include <linux/fmc-sdb.h>
#include "for-2.6.24.h"
static int fmc_must_dump_eeprom;
module_param_named(dump_eeprom, fmc_must_dump_eeprom, int, 0644);
static int fmc_must_dump_sdb;
......
......@@ -12,6 +12,8 @@
#include <linux/workqueue.h>
#include <linux/fmc.h>
#include "for-2.6.24.h"
static char *ff_eeprom;
module_param_named(eeprom, ff_eeprom, charp, 0444);
......
......@@ -13,6 +13,7 @@
#include <linux/init.h>
#include <linux/fmc.h>
#include <asm/unaligned.h>
#include "for-2.6.24.h"
/*
* This module uses the firmware loader to program the whole or part
......
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