lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Mon, 28 Nov 2011 17:30:59 -0800
From:	Jeremy Fitzhardinge <jeremy@...p.org>
To:	Stephen Rothwell <sfr@...b.auug.org.au>
CC:	Jiri Kosina <jikos@...os.cz>, linux-next@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: linux-next: build failure after merge of the hid tree


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

On 11/28/2011 05:00 PM, Stephen Rothwell wrote:
> Hi Jiri,
>
> After merging the hid tree, today's linux-next build (powerpc
> ppc64_defconfig) failed like this:
>
> drivers/hid/hid-input.c: In function 'hidinput_hid_event':
> drivers/hid/hid-input.c:865:6: error: 'struct hid_device' has no member
named 'battery_val'
> drivers/hid/hid-input.c:866:3: error: 'struct hid_device' has no member
named 'battery_min'
> drivers/hid/hid-input.c:866:3: error: 'struct hid_device' has no member
named 'battery_max'
>
> Caused by commit 4f5ca836bef3 ("HID: hid-input: add support for HID
> devices reporting Battery Strength"). Those members are only defined when
> CONFIG_HID_BATTERY_STRENGTH is set.
>
> I have used the hid tree from next-20111128 for today.

Oh, sorry about that.  Is this sufficient?

Subject: [PATCH] hid-input: fix compile for !HID_BATTERY_STRENGTH

As reported by Stephen Rothwell:
drivers/hid/hid-input.c: In function 'hidinput_hid_event':
drivers/hid/hid-input.c:865:6: error: 'struct hid_device' has no member
named 'battery_val'
drivers/hid/hid-input.c:866:3: error: 'struct hid_device' has no member
named 'battery_min'
drivers/hid/hid-input.c:866:3: error: 'struct hid_device' has no member
named 'battery_max'

Signed-off-by: Jeremy Fitzhardinge <jeremy@...p.org>
Reported-by: Stephen Rothwell <sfr@...b.auug.org.au>

diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
index 83afb86..d9cadb3 100644
- --- a/drivers/hid/hid-input.c
+++ b/drivers/hid/hid-input.c
@@ -861,12 +861,14 @@ void hidinput_hid_event(struct hid_device *hid,
struct hid_field *field, struct
 
     input = field->hidinput->input;
 
+#ifdef CONFIG_HID_BATTERY_STRENGTH
     if (usage->hid == HID_DC_BATTERYSTRENGTH) {
         hid->battery_val = value;
         hid_dbg(hid, "battery value is %d (range %d-%d)\n",
             value, hid->battery_min, hid->battery_max);
         return;
     }
+#endif
 
     if (!usage->type)
         return;

    J
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iQEkBAEBCgAGBQJO1DXKAAoJEAUkni6MUg7H2/wIPAk0oHGVawNScWJdJXMhMVca
ApxAr1h2v5kgIzRlihkpOiK3opft/GzBYh54HHd4nPdC5D4KAmuOXeX2+fwVgIEG
SlrwsGU4J9n9uH/e3qgJf2aANcWH+bQwqL58ZyLE0Yo+N3dBzDNaNGd8Gygw8jk+
mGtsMAfjIwe5vDLmsIED1+hqGNUL8/vt+TnCcpNVWUdrUtCT7dpDifcoeblO/qrs
5hWbpf+AOek7UEoHQ0qAbRLi8A1FcoMs20mHiSpkfVn2d2gUYUYZRjeW66xwuKB7
Q9iYEoOEszj+07nkHvS8VZZFMIXKsBOvkDVrktQtgDTZzI71axbgKPK8UESjjH4U
uMPpWmv8yA==
=2NZE
-----END PGP SIGNATURE-----

--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ