Corrected email address. On Tue, 2014-12-09 at 15:26 -0800, Srinivas Pandruvada wrote: > On Tue, 2014-12-09 at 22:43 +0100, Rafael J. Wysocki wrote: > > On Tuesday, December 09, 2014 12:53:05 PM Srinivas Pandruvada wrote: > > > The ART table refers to actual bus id name for specifying relationship. > > > Naming "Fan" is not enough as name in the ART table can change on every > > > platform. > > > > > > Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@xxxxxxxxxxxxxxx> > > > --- > > > drivers/acpi/fan.c | 8 +++++++- > > > 1 file changed, 7 insertions(+), 1 deletion(-) > > > > > > diff --git a/drivers/acpi/fan.c b/drivers/acpi/fan.c > > > index caf9b76..c9213bc 100644 > > > --- a/drivers/acpi/fan.c > > > +++ b/drivers/acpi/fan.c > > > @@ -325,6 +325,7 @@ static int acpi_fan_probe(struct platform_device *pdev) > > > struct thermal_cooling_device *cdev; > > > struct acpi_fan *fan; > > > struct acpi_device *device = ACPI_COMPANION(&pdev->dev); > > > + char *name; > > > > > > fan = devm_kzalloc(&pdev->dev, sizeof(*fan), GFP_KERNEL); > > > if (!fan) { > > > @@ -346,7 +347,12 @@ static int acpi_fan_probe(struct platform_device *pdev) > > > } > > > } > > > > > > - cdev = thermal_cooling_device_register("Fan", device, > > > + if (!strncmp(pdev->name, "INT3404", strlen("INT3404"))) > > > > strcmp() should be sufficient here (we need to have a match to get to this point > > anyway). > The pdev->name comes up with instance number: INT3404:00, so only > comparing "INT3404" as we can have multiple instances. > > > > > That said I'd compare with "PNP0C0B" and then use "Fan" if that's matching > > or the device ID otherwise. > I will submit another patch with this change. > Here also it comes up with PNPC0B:instance number, so still have to > compare only "PNPC0B" > > Thanks, > Srinivas > > > + name = acpi_device_bid(device); > > > + else > > > + name = "Fan"; > > > + > > > + cdev = thermal_cooling_device_register(name, device, > > > &fan_cooling_ops); > > > if (IS_ERR(cdev)) { > > > result = PTR_ERR(cdev); > > > > > > > And please CC ACPI patches to linux-acpi. > > > ��.n��������+%������w��{.n�����{�����ܨ}���Ơz�j:+v�����w����ޙ��&�)ߡ�a����z�ޗ���ݢj��w�f