From patchwork Thu Apr 22 13:54:02 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Grazvydas Ignotas X-Patchwork-Id: 94118 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o3MDsVe3014736 for ; Thu, 22 Apr 2010 13:54:31 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754944Ab0DVNy3 (ORCPT ); Thu, 22 Apr 2010 09:54:29 -0400 Received: from mail-ww0-f46.google.com ([74.125.82.46]:37274 "EHLO mail-ww0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754772Ab0DVNy3 (ORCPT ); Thu, 22 Apr 2010 09:54:29 -0400 Received: by wwb24 with SMTP id 24so4819406wwb.19 for ; Thu, 22 Apr 2010 06:54:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer; bh=U7kfYrCIGCu49jED0guYmyBcQb18op89NwZo+JKQZwo=; b=GROpKZGUOMQkFNrNIsNQFH01kadk6X7wQd+JEmGFGsEceQKXI8WjZ27+vtAXfWGAG1 5Hna2vEd0gLN9EGd4lkEFvnevy1ViHmqvN9mt9E4NVV/m+U9aashuvtzJO1rt8qpLW+r yjMBBzUb2cc2gZMMEpzyd51sw86oZL9wLnRlE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=Zatfw7q+C+EoWRz8cLyI7aXCQa6sQzLKwEUEQO9ltaWfGJwkGWCkwa2S8gHNIfunw7 YMicV4cJ3vR6vumOSLvt5fC0tv4OchcxPVPsgPSe74sSRRPeJSZXPejcSZASsMu2xtWm wgg+shtgnxZ7m5nbhe2zDlF0dUJ/dRdAfj1jo= Received: by 10.216.90.130 with SMTP id e2mr139221wef.210.1271944467311; Thu, 22 Apr 2010 06:54:27 -0700 (PDT) Received: from localhost.localdomain (ip-88-119-226-136.static.b4net.lt [88.119.226.136]) by mx.google.com with ESMTPS id t27sm34339072wbc.17.2010.04.22.06.54.21 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 22 Apr 2010 06:54:24 -0700 (PDT) From: Grazvydas Ignotas To: "Luis R. Rodriguez" Cc: linux-wireless@vger.kernel.org, Grazvydas Ignotas Subject: [PATCH] compat: fix uevent_suppress on 2.6.29 or older kernels Date: Thu, 22 Apr 2010 16:54:02 +0300 Message-Id: <1271944442-9214-1-git-send-email-notasas@gmail.com> X-Mailer: git-send-email 1.7.0.2 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Thu, 22 Apr 2010 13:54:31 +0000 (UTC) diff --git a/compat/compat_firmware_class.c b/compat/compat_firmware_class.c index ce937a3..54ee8b9 100644 --- a/compat/compat_firmware_class.c +++ b/compat/compat_firmware_class.c @@ -432,6 +432,8 @@ static int fw_register_device(struct device **dev_p, const char *fw_name, dev_set_drvdata(f_dev, fw_priv); #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,30)) dev_set_uevent_suppress(f_dev, 1); +#else + f_dev->uevent_suppress = 1; #endif retval = device_register(f_dev); if (retval) { @@ -479,9 +481,11 @@ static int fw_setup_device(struct firmware *fw, struct device **dev_p, goto error_unreg; } -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,30)) if (uevent) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,30)) dev_set_uevent_suppress(f_dev, 0); +#else + f_dev->uevent_suppress = 0; #endif *dev_p = f_dev; goto out;