mirror of
https://github.com/torvalds/linux.git
synced 2024-11-27 06:31:52 +00:00
mfd: OLPC: Clean up names to match what OLPC actually uses
The cs5535-pms cell doesn't actually need to be cloned, so we can drop that and simply have the olpc-xo1.c driver use "cs5535-pms" directly. Also, rename the cs5535-acpi clones to what we actually use for the (currently out-of-tree) SCI driver. In the process, that fixes a subtle bug in olpc-xo1.c which broke powerdown on XO-1s.. olpc-xo1-ac-acpi was a typo, not something that actually existed. Signed-off-by: Daniel Drake <dsd@laptop.org> Signed-off-by: Andres Salomon <dilinger@queued.net> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
parent
fa1df69168
commit
adfa4bd4a8
@ -72,9 +72,9 @@ static int __devinit olpc_xo1_probe(struct platform_device *pdev)
|
|||||||
dev_err(&pdev->dev, "can't fetch device resource info\n");
|
dev_err(&pdev->dev, "can't fetch device resource info\n");
|
||||||
return -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
if (strcmp(pdev->name, "olpc-xo1-pms") == 0)
|
if (strcmp(pdev->name, "cs5535-pms") == 0)
|
||||||
pms_base = res->start;
|
pms_base = res->start;
|
||||||
else if (strcmp(pdev->name, "olpc-xo1-ac-acpi") == 0)
|
else if (strcmp(pdev->name, "olpc-xo1-pm-acpi") == 0)
|
||||||
acpi_base = res->start;
|
acpi_base = res->start;
|
||||||
|
|
||||||
/* If we have both addresses, we can override the poweroff hook */
|
/* If we have both addresses, we can override the poweroff hook */
|
||||||
@ -90,9 +90,9 @@ static int __devexit olpc_xo1_remove(struct platform_device *pdev)
|
|||||||
{
|
{
|
||||||
mfd_cell_disable(pdev);
|
mfd_cell_disable(pdev);
|
||||||
|
|
||||||
if (strcmp(pdev->name, "olpc-xo1-pms") == 0)
|
if (strcmp(pdev->name, "cs5535-pms") == 0)
|
||||||
pms_base = 0;
|
pms_base = 0;
|
||||||
else if (strcmp(pdev->name, "olpc-xo1-acpi") == 0)
|
else if (strcmp(pdev->name, "olpc-xo1-pm-acpi") == 0)
|
||||||
acpi_base = 0;
|
acpi_base = 0;
|
||||||
|
|
||||||
pm_power_off = NULL;
|
pm_power_off = NULL;
|
||||||
@ -101,7 +101,7 @@ static int __devexit olpc_xo1_remove(struct platform_device *pdev)
|
|||||||
|
|
||||||
static struct platform_driver cs5535_pms_drv = {
|
static struct platform_driver cs5535_pms_drv = {
|
||||||
.driver = {
|
.driver = {
|
||||||
.name = "olpc-xo1-pms",
|
.name = "cs5535-pms",
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
},
|
},
|
||||||
.probe = olpc_xo1_probe,
|
.probe = olpc_xo1_probe,
|
||||||
@ -110,7 +110,7 @@ static struct platform_driver cs5535_pms_drv = {
|
|||||||
|
|
||||||
static struct platform_driver cs5535_acpi_drv = {
|
static struct platform_driver cs5535_acpi_drv = {
|
||||||
.driver = {
|
.driver = {
|
||||||
.name = "olpc-xo1-acpi",
|
.name = "olpc-xo1-pm-acpi",
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
},
|
},
|
||||||
.probe = olpc_xo1_probe,
|
.probe = olpc_xo1_probe,
|
||||||
|
@ -115,14 +115,12 @@ static __devinitdata struct mfd_cell cs5535_mfd_cells[] = {
|
|||||||
#ifdef CONFIG_OLPC
|
#ifdef CONFIG_OLPC
|
||||||
static void __devinit cs5535_clone_olpc_cells(void)
|
static void __devinit cs5535_clone_olpc_cells(void)
|
||||||
{
|
{
|
||||||
const char *acpi_clones[] = { "olpc-xo1-acpi" };
|
const char *acpi_clones[] = { "olpc-xo1-pm-acpi", "olpc-xo1-sci-acpi" };
|
||||||
const char *pms_clones[] = { "olpc-xo1-pms" };
|
|
||||||
|
|
||||||
if (!machine_is_olpc())
|
if (!machine_is_olpc())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
mfd_clone_cell("cs5535-acpi", acpi_clones, ARRAY_SIZE(acpi_clones));
|
mfd_clone_cell("cs5535-acpi", acpi_clones, ARRAY_SIZE(acpi_clones));
|
||||||
mfd_clone_cell("cs5535-pms", pms_clones, ARRAY_SIZE(pms_clones));
|
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
static void cs5535_clone_olpc_cells(void) { }
|
static void cs5535_clone_olpc_cells(void) { }
|
||||||
|
Loading…
Reference in New Issue
Block a user