Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 312744
b: refs/heads/master
c: bb6b98d
h: refs/heads/master
v: v3
  • Loading branch information
Rafael J. Wysocki committed Jul 1, 2012
1 parent 49913ab commit 15426fe
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 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: 4ce05b42603195386fa783c4f070ecc8682c189f
refs/heads/master: bb6b98d6e4f9aada309c54ebd6df1cc6151f3af1
20 changes: 12 additions & 8 deletions trunk/drivers/platform/x86/sony-laptop.c
Original file line number Diff line number Diff line change
Expand Up @@ -1452,7 +1452,7 @@ static void sony_nc_function_resume(void)
&result);
}

static int sony_nc_resume(struct acpi_device *device)
static int sony_nc_resume(struct device *dev)
{
struct sony_nc_value *item;
acpi_handle handle;
Expand Down Expand Up @@ -1484,6 +1484,8 @@ static int sony_nc_resume(struct acpi_device *device)
return 0;
}

static SIMPLE_DEV_PM_OPS(sony_nc_pm, NULL, sony_nc_resume);

static void sony_nc_rfkill_cleanup(void)
{
int i;
Expand Down Expand Up @@ -2728,9 +2730,9 @@ static struct acpi_driver sony_nc_driver = {
.ops = {
.add = sony_nc_add,
.remove = sony_nc_remove,
.resume = sony_nc_resume,
.notify = sony_nc_notify,
},
.drv.pm = &sony_nc_pm,
};

/*********** SPIC (SNY6001) Device ***********/
Expand Down Expand Up @@ -4243,19 +4245,22 @@ static int sony_pic_add(struct acpi_device *device)
return result;
}

static int sony_pic_suspend(struct acpi_device *device)
static int sony_pic_suspend(struct device *dev)
{
if (sony_pic_disable(device))
if (sony_pic_disable(to_acpi_device(dev)))
return -ENXIO;
return 0;
}

static int sony_pic_resume(struct acpi_device *device)
static int sony_pic_resume(struct device *dev)
{
sony_pic_enable(device, spic_dev.cur_ioport, spic_dev.cur_irq);
sony_pic_enable(to_acpi_device(dev),
spic_dev.cur_ioport, spic_dev.cur_irq);
return 0;
}

static SIMPLE_DEV_PM_OPS(sony_pic_pm, sony_pic_suspend, sony_pic_resume);

static const struct acpi_device_id sony_pic_device_ids[] = {
{SONY_PIC_HID, 0},
{"", 0},
Expand All @@ -4269,9 +4274,8 @@ static struct acpi_driver sony_pic_driver = {
.ops = {
.add = sony_pic_add,
.remove = sony_pic_remove,
.suspend = sony_pic_suspend,
.resume = sony_pic_resume,
},
.drv.pm = &sony_pic_pm,
};

static struct dmi_system_id __initdata sonypi_dmi_table[] = {
Expand Down

0 comments on commit 15426fe

Please sign in to comment.