Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 288954
b: refs/heads/master
c: 605926e
h: refs/heads/master
v: v3
  • Loading branch information
Szymon Janc authored and Greg Kroah-Hartman committed Feb 9, 2012
1 parent b32d707 commit 8c0625f
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 45 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7267d2610a7ed3f56a1f20f58b9ee0d944025b01
refs/heads/master: 605926ef5a8a7f9d778b974c96e90e8f8368a595
75 changes: 31 additions & 44 deletions trunk/drivers/staging/quickstart/quickstart.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,58 +61,18 @@ struct quickstart_btn {
struct quickstart_btn *next;
};

static struct quickstart_driver_data {
struct quickstart_btn *btn_lst;
struct quickstart_btn *pressed;
} quickstart_data;

/* ACPI driver structs */
struct quickstart_acpi {
struct acpi_device *device;
struct quickstart_btn *btn;
};
static int quickstart_acpi_add(struct acpi_device *device);
static int quickstart_acpi_remove(struct acpi_device *device, int type);
static const struct acpi_device_id quickstart_device_ids[] = {
{QUICKSTART_ACPI_HID, 0},
{"", 0},
};

static struct acpi_driver quickstart_acpi_driver = {
.name = "quickstart",
.class = QUICKSTART_ACPI_CLASS,
.ids = quickstart_device_ids,
.ops = {
.add = quickstart_acpi_add,
.remove = quickstart_acpi_remove,
},
};
static struct quickstart_driver_data {
struct quickstart_btn *btn_lst;
struct quickstart_btn *pressed;
} quickstart_data;

/* Input device structs */
struct input_dev *quickstart_input;

/* Platform driver structs */
static ssize_t quickstart_buttons_show(struct device *dev,
struct device_attribute *attr,
char *buf);
static ssize_t quickstart_pressed_button_show(struct device *dev,
struct device_attribute *attr,
char *buf);
static ssize_t quickstart_pressed_button_store(struct device *dev,
struct device_attribute *attr,
const char *buf,
size_t count);
static DEVICE_ATTR(pressed_button, 0666, quickstart_pressed_button_show,
quickstart_pressed_button_store);
static DEVICE_ATTR(buttons, 0444, quickstart_buttons_show, NULL);
static struct platform_device *pf_device;
static struct platform_driver pf_driver = {
.driver = {
.name = QUICKSTART_PF_DRIVER_NAME,
.owner = THIS_MODULE,
}
};

/* Platform driver functions */
static ssize_t quickstart_buttons_show(struct device *dev,
struct device_attribute *attr,
Expand Down Expand Up @@ -353,6 +313,33 @@ static int quickstart_acpi_remove(struct acpi_device *device, int type)
return 0;
}

/* Platform driver structs */
static DEVICE_ATTR(pressed_button, 0666, quickstart_pressed_button_show,
quickstart_pressed_button_store);
static DEVICE_ATTR(buttons, 0444, quickstart_buttons_show, NULL);
static struct platform_device *pf_device;
static struct platform_driver pf_driver = {
.driver = {
.name = QUICKSTART_PF_DRIVER_NAME,
.owner = THIS_MODULE,
}
};

static const struct acpi_device_id quickstart_device_ids[] = {
{QUICKSTART_ACPI_HID, 0},
{"", 0},
};

static struct acpi_driver quickstart_acpi_driver = {
.name = "quickstart",
.class = QUICKSTART_ACPI_CLASS,
.ids = quickstart_device_ids,
.ops = {
.add = quickstart_acpi_add,
.remove = quickstart_acpi_remove,
},
};

/* Module functions */
static void quickstart_exit(void)
{
Expand Down

0 comments on commit 8c0625f

Please sign in to comment.