[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20120220145611.14b3b115@v0nbox>
Date: Mon, 20 Feb 2012 14:56:11 -0500
From: Vivien Didelot <vivien.didelot@...oirfairelinux.com>
To: Guenter Roeck <guenter.roeck@...csson.com>
Cc: "x86@...nel.org" <x86@...nel.org>, Ingo Molnar <mingo@...hat.com>,
Thomas Gleixner <tglx@...utronix.de>,
"H. Peter Anvin" <hpa@...or.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"lm-sensors@...sensors.org" <lm-sensors@...sensors.org>,
Jean Delvare <khali@...ux-fr.org>
Subject: Re: [PATCH v5 4/5] hwmon: add MAX197 support
On Mon, 20 Feb 2012 10:27:02 -0800,
Guenter Roeck <guenter.roeck@...csson.com> wrote:
> > I check the platform_device_register_simple() returned value
> > because it is the platform itself, while the others are on-board
> > devices. I thought that it is not a big deal if their registrations
> > failed but the platform registration succeeded. Maybe I'm wrong and
> > I should check everything.
> >
> Hmm .. seems to make sense. Ok with me. Only question is if you would
> want to have it fail silently or issue a log message (possibly debug)
> to report the failure.
Ok, I'll go for something like the following:
if (led_classdev_register(&pdev->dev, &ts5500_led_cdev))
dev_warn(ts5500_led_cdev.dev, "failed to register the LED\n");
if (ts5500->adc) {
ts5500_adc_pdev.dev.parent = &pdev->dev;
if (platform_device_register(&ts5500_adc_pdev))
dev_warn(&ts5500_adc_pdev.dev,
"failed to register the A/D converter\n");
}
Thanks,
--
Vivien Didelot
Savoir-faire Linux Inc.
Tel: (514) 276-5468 #149
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists