2010-11-07 14:46:37

by Tracey Dent

[permalink] [raw]
Subject: [PATCH 1/2] Drivers: hid: Makefile: Cleaned up Makefile

Changed Makefile to use <modules>-y instead of <modules>-objs because -objs is
deprecated and should now be switched. According to (documentation/kbuild/makefiles.txt).

Signed-off-by: Tracey Dent <[email protected]>
---
drivers/hid/Makefile | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/hid/Makefile b/drivers/hid/Makefile
index c335605..dad858b 100644
--- a/drivers/hid/Makefile
+++ b/drivers/hid/Makefile
@@ -1,7 +1,7 @@
#
# Makefile for the HID driver
#
-hid-objs := hid-core.o hid-input.o
+hid-y := hid-core.o hid-input.o

ifdef CONFIG_DEBUG_FS
hid-objs += hid-debug.o
@@ -11,18 +11,18 @@ obj-$(CONFIG_HID) += hid.o

hid-$(CONFIG_HIDRAW) += hidraw.o

-hid-logitech-objs := hid-lg.o
+hid-logitech-y := hid-lg.o
ifdef CONFIG_LOGITECH_FF
- hid-logitech-objs += hid-lgff.o
+ hid-logitech-y += hid-lgff.o
endif
ifdef CONFIG_LOGIRUMBLEPAD2_FF
- hid-logitech-objs += hid-lg2ff.o
+ hid-logitech-y += hid-lg2ff.o
endif
ifdef CONFIG_LOGIG940_FF
- hid-logitech-objs += hid-lg3ff.o
+ hid-logitech-y += hid-lg3ff.o
endif
ifdef CONFIG_LOGIWII_FF
- hid-logitech-objs += hid-lg4ff.o
+ hid-logitech-y += hid-lg4ff.o
endif

obj-$(CONFIG_HID_3M_PCT) += hid-3m-pct.o
--
1.7.3.1.104.gc752e


2010-11-07 14:46:39

by Tracey Dent

[permalink] [raw]
Subject: [PATCH 2/2] Drivers: hid: usbhid: Makefile: Cleaned up Makefile

Changed Makefile to use <modules>-y instead of <modules>-objs because -objs is
deprecated and should now be switched. According to (documentation/kbuild/makefiles.txt).

Signed-off-by: Tracey Dent <[email protected]>
---
drivers/hid/usbhid/Makefile | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/hid/usbhid/Makefile b/drivers/hid/usbhid/Makefile
index 1329ecb..db3cf31 100644
--- a/drivers/hid/usbhid/Makefile
+++ b/drivers/hid/usbhid/Makefile
@@ -3,15 +3,15 @@
#

# Multipart objects.
-usbhid-objs := hid-core.o hid-quirks.o
+usbhid-y := hid-core.o hid-quirks.o

# Optional parts of multipart objects.

ifeq ($(CONFIG_USB_HIDDEV),y)
- usbhid-objs += hiddev.o
+ usbhid-y += hiddev.o
endif
ifeq ($(CONFIG_HID_PID),y)
- usbhid-objs += hid-pidff.o
+ usbhid-y += hid-pidff.o
endif

obj-$(CONFIG_USB_HID) += usbhid.o
--
1.7.3.1.104.gc752e

2010-11-15 14:58:12

by Jiri Kosina

[permalink] [raw]
Subject: Re: [PATCH 1/2] Drivers: hid: Makefile: Cleaned up Makefile

On Sun, 7 Nov 2010, Tracey Dent wrote:

> Changed Makefile to use <modules>-y instead of <modules>-objs because
> -objs is deprecated and should now be switched. According to
> (documentation/kbuild/makefiles.txt).

Actually, where exactly does this file document it?

Thanks,

--
Jiri Kosina
SUSE Labs, Novell Inc.

2010-11-17 03:28:21

by Tracey Dent

[permalink] [raw]
Subject: Re: [PATCH 1/2] Drivers: hid: Makefile: Cleaned up Makefile

On 11/15/10, Jiri Kosina <[email protected]> wrote:
> On Sun, 7 Nov 2010, Tracey Dent wrote:
>
>> Changed Makefile to use <modules>-y instead of <modules>-objs because
>> -objs is deprecated and should now be switched. According to
>> (documentation/kbuild/makefiles.txt).
>
> Actually, where exactly does this file document it?
>

It documents how it should be done in the section entitled --- 3.7
Compilation flags (which starts on line 284).

> Thanks,
>
> --
> Jiri Kosina
> SUSE Labs, Novell Inc.
>

regards

Tracey Dent

2010-11-17 06:01:12

by Cong Wang

[permalink] [raw]
Subject: Re: [PATCH 1/2] Drivers: hid: Makefile: Cleaned up Makefile

On Sun, Nov 07, 2010 at 09:46:27AM -0500, Tracey Dent wrote:
>Changed Makefile to use <modules>-y instead of <modules>-objs because -objs is
>deprecated and should now be switched. According to (documentation/kbuild/makefiles.txt).
>
>Signed-off-by: Tracey Dent <[email protected]>

Acked-by: WANG Cong <[email protected]>

2010-11-17 06:02:29

by Cong Wang

[permalink] [raw]
Subject: Re: [PATCH 2/2] Drivers: hid: usbhid: Makefile: Cleaned up Makefile

On Sun, Nov 07, 2010 at 09:46:28AM -0500, Tracey Dent wrote:
>Changed Makefile to use <modules>-y instead of <modules>-objs because -objs is
>deprecated and should now be switched. According to (documentation/kbuild/makefiles.txt).
>
>Signed-off-by: Tracey Dent <[email protected]>

Acked-by: WANG Cong <[email protected]>

Thanks.

2010-11-17 07:21:27

by Dmitry Torokhov

[permalink] [raw]
Subject: Re: [PATCH 1/2] Drivers: hid: Makefile: Cleaned up Makefile

On Tue, Nov 16, 2010 at 10:28:19PM -0500, Tracey Dent wrote:
> On 11/15/10, Jiri Kosina <[email protected]> wrote:
> > On Sun, 7 Nov 2010, Tracey Dent wrote:
> >
> >> Changed Makefile to use <modules>-y instead of <modules>-objs because
> >> -objs is deprecated and should now be switched. According to
> >> (documentation/kbuild/makefiles.txt).
> >
> > Actually, where exactly does this file document it?
> >
>
> It documents how it should be done in the section entitled --- 3.7
> Compilation flags (which starts on line 284).
>

Actually the only reference I could find is in 3.3:

If a kernel module is built from several source files, you specify
that you want to build a module in the same way as above; however,
kbuild needs to know which object files you want to build your
module from, so you have to tell it by setting a $(<module_name>-y)
variable.

See commit 4f8272802739f5c6ce6b0a548810a181d2f1b652 for reasoning behind
the change.

Thanks.

--
Dmitry

2010-11-17 18:18:49

by Tracey Dent

[permalink] [raw]
Subject: Re: [PATCH 1/2] Drivers: hid: Makefile: Cleaned up Makefile

On 11/17/10, Dmitry Torokhov <[email protected]> wrote:
> On Tue, Nov 16, 2010 at 10:28:19PM -0500, Tracey Dent wrote:
>> On 11/15/10, Jiri Kosina <[email protected]> wrote:
>> > On Sun, 7 Nov 2010, Tracey Dent wrote:
>> >
>> >> Changed Makefile to use <modules>-y instead of <modules>-objs because
>> >> -objs is deprecated and should now be switched. According to
>> >> (documentation/kbuild/makefiles.txt).
>> >
>> > Actually, where exactly does this file document it?
>> >
>>
>> It documents how it should be done in the section entitled --- 3.7
>> Compilation flags (which starts on line 284).
>>
>
> Actually the only reference I could find is in 3.3:
>
> If a kernel module is built from several source files, you specify
> that you want to build a module in the same way as above; however,
> kbuild needs to know which object files you want to build your
> module from, so you have to tell it by setting a $(<module_name>-y)
> variable.
>
> See commit 4f8272802739f5c6ce6b0a548810a181d2f1b652 for reasoning behind
> the change.
>

You're right, I was thinking I changed to use ccflags-y flags. Sorry :(

> Thanks.
>
> --
> Dmitry
>

Thanks

Tracey Dent