Commit f467fd0e authored by Ondrej Zary's avatar Ondrej Zary Committed by Damien Le Moal

ata: pata_parport-bpck6: remove struct ppc_storage

Store the remaining two variables (cur_ctrl and ppc_flags) in struct
ppc_storage directly in pi->private and remove struct ppc_storage.
Signed-off-by: default avatarOndrej Zary <linux@zary.sk>
Reviewed-by: default avatarSergey Shtylyov <s.shtylyov@omp.ru>
Signed-off-by: default avatarDamien Le Moal <damien.lemoal@opensource.wdc.com>
parent baa6f0f8
......@@ -14,7 +14,6 @@
#include <linux/module.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/types.h>
#include <asm/io.h>
#include <linux/parport.h>
......@@ -107,24 +106,6 @@ static void bpck6_log_adapter(struct pi_adapter *pi)
pi->unit, pi->port, pi->mode, mode_string[pi->mode], pi->delay);
}
static int bpck6_init_proto(struct pi_adapter *pi)
{
struct ppc_storage *p = kzalloc(sizeof(struct ppc_storage), GFP_KERNEL);
if (p) {
pi->private = (unsigned long)p;
return 0;
}
dev_err(&pi->dev, "ERROR COULDN'T ALLOCATE MEMORY\n");
return -1;
}
static void bpck6_release_proto(struct pi_adapter *pi)
{
kfree((void *)(pi->private));
}
static struct pi_protocol bpck6 = {
.owner = THIS_MODULE,
.name = "bpck6",
......@@ -140,8 +121,6 @@ static struct pi_protocol bpck6 = {
.test_port = bpck6_test_port,
.probe_unit = bpck6_probe_unit,
.log_adapter = bpck6_log_adapter,
.init_proto = bpck6_init_proto,
.release_proto = bpck6_release_proto,
};
MODULE_LICENSE("GPL");
......
This diff is collapsed.
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