Return-path: Received: from mail-fx0-f217.google.com ([209.85.220.217]:63973 "EHLO mail-fx0-f217.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933273AbZHVLUa (ORCPT ); Sat, 22 Aug 2009 07:20:30 -0400 MIME-Version: 1.0 In-Reply-To: <1250890778-28959-1-git-send-email-Mario_Limonciello@Dell.com> References: <1250706969-10382-1-git-send-email-Mario_Limonciello@Dell.com> <1250890778-28959-1-git-send-email-Mario_Limonciello@Dell.com> Date: Sat, 22 Aug 2009 12:20:27 +0100 Message-ID: <9b2b86520908220420p282c862fn9c44697db010a08d@mail.gmail.com> Subject: Re: [PATCH] compal-laptop: Replace sysfs support with rfkill support From: Alan Jenkins To: Mario Limonciello Cc: cezary.jackiewicz@gmail.com, linux-wireless@vger.kernel.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-wireless-owner@vger.kernel.org List-ID: On 8/21/09, Mario Limonciello wrote: > This drops the support for manually groking the files in sysfs > to turn on and off the WLAN and BT for Compal laptops in favor > of platform rfkill support. > > It has been combined into a single patch to not introduce regressions > in the process of simply adding rfkill support. > > Signed-off-by: Mario Limonciello > @@ -390,23 +314,19 @@ static int __init compal_init(void) > > ret = platform_device_add(compal_device); > if (ret) > - goto fail_platform_device1; > + goto fail_platform_device; > > - ret = sysfs_create_group(&compal_device->dev.kobj, > - &compal_attribute_group); > + ret = setup_rfkill(); > if (ret) > - goto fail_platform_device2; > + goto fail_rfkill; > > printk(KERN_INFO "compal-laptop: driver "COMPAL_DRIVER_VERSION > " successfully loaded.\n"); > > return 0; > > -fail_platform_device2: > - > - platform_device_del(compal_device); > - > -fail_platform_device1: > +fail_rfkill: > +fail_platform_device: > > platform_device_put(compal_device); > I guess our mails crossed. As in the previous patch I think platform_device_del() should still be called, in the fail_rfkill case. Previously platform_device_del() was required after platform_device_add(), if we bailed out because of a failure in sysfs_create_group(). I don't think that requirement is removed by replacing sysfs_create_group() with setup_rfkill(). Regards Alan