Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[GIT PATCH] USB patches for 2.6.30-git

15 views
Skip to first unread message

Greg KH

unread,
Jun 16, 2009, 1:20:10 AM6/16/09
to
Here is the big USB patch queue for your kernel tree.

Stuff in here:
- USB 3.0 support!
- various new drivers
- utf-8 bugfixes and proper handling by the usb core now (that makes
up the majority of the non-usb patches in the diffstat below)
- USB power management work
- USB core cleanups for debugging code and other minor stuff
- various bugfixes that were too big to go into .30

All of the non-USB related patches (like the PCI core one which the USB
core needs) have been acked by the respective subsystem maintainer to be
sent through this tree.

Please pull from:
master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6.git/

All of these patches have been in the -next and -mm releases for a while.

The full patches will be sent to the linux-usb mailing list, if anyone
wants to see them.

thanks,

greg k-h

------------

MAINTAINERS | 6 +
.../arm/plat-s3c/include/plat/regs-usb-hsotg-phy.h | 50 +
arch/arm/plat-s3c/include/plat/regs-usb-hsotg.h | 377 +++
drivers/pci/pci.c | 5 +
drivers/staging/uc2322/aten2011.c | 4 +-
drivers/usb/Kconfig | 1 +
drivers/usb/Makefile | 1 +
drivers/usb/class/cdc-acm.c | 71 +-
drivers/usb/class/cdc-acm.h | 2 +
drivers/usb/class/usbtmc.c | 6 +
drivers/usb/core/Kconfig | 16 +-
drivers/usb/core/Makefile | 4 +-
drivers/usb/core/config.c | 192 ++-
drivers/usb/core/driver.c | 56 +-
drivers/usb/core/endpoint.c | 160 +-
drivers/usb/core/hcd-pci.c | 244 +-
drivers/usb/core/hcd.c | 220 ++-
drivers/usb/core/hcd.h | 55 +-
drivers/usb/core/hub.c | 134 +-
drivers/usb/core/hub.h | 3 +
drivers/usb/core/message.c | 194 +-
drivers/usb/core/sysfs.c | 12 +-
drivers/usb/core/urb.c | 12 +
drivers/usb/core/usb.c | 76 +-
drivers/usb/core/usb.h | 13 +-
drivers/usb/gadget/Kconfig | 53 +-
drivers/usb/gadget/Makefile | 8 +
drivers/usb/gadget/at91_udc.c | 4 +-
drivers/usb/gadget/atmel_usba_udc.c | 20 +-
drivers/usb/gadget/audio.c | 302 ++
drivers/usb/gadget/ci13xxx_udc.c | 6 +-
drivers/usb/gadget/f_audio.c | 707 ++++
drivers/usb/gadget/f_rndis.c | 4 +-
drivers/usb/gadget/file_storage.c | 93 +-
drivers/usb/gadget/fsl_mx3_udc.c | 95 +
.../usb/gadget/{fsl_usb2_udc.c => fsl_udc_core.c} | 69 +-
drivers/usb/gadget/fsl_usb2_udc.h | 18 +
drivers/usb/gadget/gadget_chips.h | 8 +
drivers/usb/gadget/goku_udc.c | 6 +-
drivers/usb/gadget/imx_udc.c | 14 +-
drivers/usb/gadget/inode.c | 14 +-
drivers/usb/gadget/langwell_udc.c | 3373 ++++++++++++++++++++
drivers/usb/gadget/langwell_udc.h | 228 ++
drivers/usb/gadget/pxa27x_udc.c | 71 +-
drivers/usb/gadget/pxa27x_udc.h | 2 +
drivers/usb/gadget/s3c-hsotg.c | 3269 +++++++++++++++++++
drivers/usb/gadget/u_audio.c | 319 ++
drivers/usb/gadget/u_audio.h | 56 +
drivers/usb/gadget/u_serial.c | 1 +
drivers/usb/host/Kconfig | 20 +
drivers/usb/host/Makefile | 2 +
drivers/usb/host/ehci-au1xxx.c | 1 +
drivers/usb/host/ehci-fsl.c | 1 +
drivers/usb/host/ehci-hcd.c | 47 +-
drivers/usb/host/ehci-hub.c | 4 +-
drivers/usb/host/ehci-ixp4xx.c | 1 +
drivers/usb/host/ehci-orion.c | 3 +-
drivers/usb/host/ehci-pci.c | 27 +-
drivers/usb/host/ehci-ppc-of.c | 1 +
drivers/usb/host/ehci-ps3.c | 1 +
drivers/usb/host/ehci-q.c | 19 +-
drivers/usb/host/ehci-sched.c | 8 +-
drivers/usb/host/ehci.h | 1 +
drivers/usb/host/fhci-dbg.c | 2 +-
drivers/usb/host/hwa-hc.c | 21 -
drivers/usb/host/ohci-dbg.c | 31 +-
drivers/usb/host/ohci-hcd.c | 38 +-
drivers/usb/host/ohci-pci.c | 24 +-
drivers/usb/host/pci-quirks.c | 123 +
drivers/usb/host/r8a66597-hcd.c | 62 +-
drivers/usb/host/r8a66597.h | 38 +-
drivers/usb/host/uhci-hcd.c | 23 +-
drivers/usb/host/uhci-q.c | 2 +-
drivers/usb/host/xhci-dbg.c | 485 +++
drivers/usb/host/xhci-ext-caps.h | 145 +
drivers/usb/host/xhci-hcd.c | 1274 ++++++++
drivers/usb/host/xhci-hub.c | 308 ++
drivers/usb/host/xhci-mem.c | 769 +++++
drivers/usb/host/xhci-pci.c | 166 +
drivers/usb/host/xhci-ring.c | 1648 ++++++++++
drivers/usb/host/xhci.h | 1157 +++++++
drivers/usb/misc/sisusbvga/Kconfig | 2 +-
drivers/usb/misc/usbtest.c | 39 +-
drivers/usb/mon/mon_text.c | 2 +-
drivers/usb/musb/Kconfig | 2 +
drivers/usb/musb/blackfin.c | 11 +-
drivers/usb/musb/cppi_dma.c | 34 +-
drivers/usb/musb/cppi_dma.h | 6 +-
drivers/usb/musb/davinci.c | 54 +-
drivers/usb/musb/musb_core.c | 228 +-
drivers/usb/musb/musb_core.h | 22 +-
drivers/usb/musb/musb_gadget.c | 45 +-
drivers/usb/musb/musb_gadget_ep0.c | 45 +-
drivers/usb/musb/musb_host.c | 273 +-
drivers/usb/musb/musb_host.h | 1 +
drivers/usb/musb/musb_virthub.c | 35 +-
drivers/usb/musb/omap2430.c | 71 +-
drivers/usb/musb/tusb6010.c | 70 +-
drivers/usb/otg/Kconfig | 14 +
drivers/usb/otg/Makefile | 1 +
drivers/usb/otg/langwell_otg.c | 1915 +++++++++++
drivers/usb/otg/nop-usb-xceiv.c | 25 +-
drivers/usb/otg/twl4030-usb.c | 28 +-
drivers/usb/serial/aircable.c | 5 +-
drivers/usb/serial/belkin_sa.c | 7 +-
drivers/usb/serial/bus.c | 27 +-
drivers/usb/serial/cp210x.c | 6 +-
drivers/usb/serial/cyberjack.c | 20 +-
drivers/usb/serial/cypress_m8.c | 11 +-
drivers/usb/serial/digi_acceleport.c | 20 +-
drivers/usb/serial/empeg.c | 8 -
drivers/usb/serial/ftdi_sio.c | 179 +-
drivers/usb/serial/ftdi_sio.h | 13 +-
drivers/usb/serial/garmin_gps.c | 214 +-
drivers/usb/serial/generic.c | 186 +-
drivers/usb/serial/io_edgeport.c | 29 +-
drivers/usb/serial/io_tables.h | 12 +-
drivers/usb/serial/io_ti.c | 22 +-
drivers/usb/serial/ipaq.c | 7 -
drivers/usb/serial/iuu_phoenix.c | 6 +-
drivers/usb/serial/keyspan.c | 13 +-
drivers/usb/serial/keyspan.h | 12 +-
drivers/usb/serial/keyspan_pda.c | 4 +-
drivers/usb/serial/kl5kusb105.c | 39 +-
drivers/usb/serial/kobil_sct.c | 12 +-
drivers/usb/serial/mct_u232.c | 13 +-
drivers/usb/serial/mos7720.c | 9 +-
drivers/usb/serial/mos7840.c | 358 ++-
drivers/usb/serial/omninet.c | 19 +-
drivers/usb/serial/opticon.c | 14 +-
drivers/usb/serial/option.c | 41 +-
drivers/usb/serial/oti6858.c | 7 +-
drivers/usb/serial/pl2303.c | 10 +-
drivers/usb/serial/sierra.c | 185 +-
drivers/usb/serial/spcp8x5.c | 5 +-
drivers/usb/serial/symbolserial.c | 14 +-
drivers/usb/serial/ti_usb_3410_5052.c | 10 +-
drivers/usb/serial/usb-serial.c | 53 +-
drivers/usb/serial/usb_debug.c | 41 +
drivers/usb/serial/visor.c | 13 +-
drivers/usb/serial/whiteheat.c | 6 +-
drivers/usb/storage/initializers.c | 14 +-
drivers/usb/storage/option_ms.c | 124 +-
drivers/usb/storage/sierra_ms.c | 2 +-
drivers/usb/storage/unusual_devs.h | 2 +-
fs/befs/linuxvfs.c | 20 +-
fs/fat/dir.c | 29 +-
fs/fat/namei_vfat.c | 4 +-
fs/isofs/joliet.c | 36 +-
fs/ncpfs/ncplib_kernel.c | 8 +-
fs/nls/nls_base.c | 166 +-
fs/nls/nls_utf8.c | 13 +-
include/linux/nls.h | 35 +-
include/linux/pci.h | 8 +
include/linux/pci_ids.h | 1 +
include/linux/usb.h | 34 +-
include/linux/usb/audio.h | 265 ++-
include/linux/usb/ch9.h | 17 +
include/linux/usb/composite.h | 3 +
include/linux/usb/langwell_otg.h | 177 +
include/linux/usb/langwell_udc.h | 310 ++
include/linux/usb/otg.h | 4 +-
include/linux/usb/r8a66597.h | 44 +
include/linux/usb/serial.h | 32 +-
164 files changed, 20947 insertions(+), 2080 deletions(-)
create mode 100644 arch/arm/plat-s3c/include/plat/regs-usb-hsotg-phy.h
create mode 100644 arch/arm/plat-s3c/include/plat/regs-usb-hsotg.h
create mode 100644 drivers/usb/gadget/audio.c
create mode 100644 drivers/usb/gadget/f_audio.c
create mode 100644 drivers/usb/gadget/fsl_mx3_udc.c
rename drivers/usb/gadget/{fsl_usb2_udc.c => fsl_udc_core.c} (99%)
create mode 100644 drivers/usb/gadget/langwell_udc.c
create mode 100644 drivers/usb/gadget/langwell_udc.h
create mode 100644 drivers/usb/gadget/s3c-hsotg.c
create mode 100644 drivers/usb/gadget/u_audio.c
create mode 100644 drivers/usb/gadget/u_audio.h
create mode 100644 drivers/usb/host/xhci-dbg.c
create mode 100644 drivers/usb/host/xhci-ext-caps.h
create mode 100644 drivers/usb/host/xhci-hcd.c
create mode 100644 drivers/usb/host/xhci-hub.c
create mode 100644 drivers/usb/host/xhci-mem.c
create mode 100644 drivers/usb/host/xhci-pci.c
create mode 100644 drivers/usb/host/xhci-ring.c
create mode 100644 drivers/usb/host/xhci.h
create mode 100644 drivers/usb/otg/langwell_otg.c
create mode 100644 include/linux/usb/langwell_otg.h
create mode 100644 include/linux/usb/langwell_udc.h
create mode 100644 include/linux/usb/r8a66597.h

---------------

Ajay Kumar Gupta (1):
musb: add high bandwidth ISO support

Alan Stern (11):
USB: consolidate usb_unbind_interface and usb_driver_release_interface
NLS: update handling of Unicode
USB: g_file_storage: use the "unaligned" accessors
PCI: add power-state name strings
USB: move PCI host controllers to new PM framework
USB: new flag for resume-from-hibernation
USB: usb-storage: fix return values from init functions
USB: EHCI: stagger frames for interrupt transfers
USB: EHCI: update toggle state for linked QHs
USB: usb-serial: call port_probe and port_remove at the right times
USB: usb-serial: replace shutdown with disconnect, release

Anand Gadiyar (1):
musb: use dma mode 1 for TX if transfer size equals maxpacket (v2)

Andrew Morton (1):
+ drivers-usb-serial-sierrac-fix-printk-warning.patch added to -mm tree

Ben Dooks (1):
USB: Gadget driver for Samsung HS/OtG block

Bryan Wu (3):
usb: misc: SiS usbvga dangle: accept MUSB_HDRC as a fast enough host controller
USB: audio: add USB audio class definitions
USB: gadget: add USB Audio Gadget driver

Clemens Ladisch (3):
nls: utf8_wcstombs: use correct buffer size in error case
nls: utf8_wcstombs: fix buffer overflow
usb: return device strings in UTF-8

Daniel Gl�ckner (2):
USB: gadget: g_serial: append zlp when tx buffer becomes empty
USB: gadget: imx_udc: don't queue more data when zlp is to be sent

Daniel Mack (1):
USB: imx_udc: fix leak in imx_ep_alloc_request()

Daniel Suchy (1):
USB: FTDI-SIO new device ids

David Brownell (7):
USB: twl4030-usb: fix minor reporting goofage
USB: nop-usb-xceiv: behave when linked as a module
musb: proper hookup to transceiver drivers
musb: otg timer cleanup
musb: make initial HNP roleswitch work (v2)
musb: support disconnect after HNP roleswitch
USB: pxa27x_udc: introduce pxa27x_clear_otgph()

Elina Pasheva (7):
USB: serial: sierra driver performance improvements
USB: serial: sierra driver debug info visibility improvement
USB: serial: sierra driver write path improvements
USB: serial: sierra driver read path bug fix
USB: serial: sierra driver zero length packet fix
USB: serial: sierra driver interrupt urb resubmit fix
USB: serial: sierra driver sierra_calc_num_ports() fix

FUJITA Tomonori (1):
USB: replace dma_sync_single and dma_sync_sg with dma_sync_single_for_cpu and dma_sync_sg_for_cpu

Frans Pop (1):
USB: Avoid PM error messages during resume if a device was disconnected

Greg Kroah-Hartman (13):
USB: add usb debugfs directory
USB: EHCI: use the new usb debugfs directory
USB: FHCI: use the new usb debugfs directory
USB: OHCI: use the new usb debugfs directory
USB: UHCI: use the new usb debugfs directory
USB: usbmon: use the new usb debugfs directory
USB: add the usbfs devices file to debugfs
USB: OHCI: use the ohci structure directly in debugfs files.
USB: EHCI: create sysfs companion files directly in the controller device
USB: remove unused usb_host class
USB: usbtmc: fix switch statment
USB: xhci: fix lots of compiler warnings.
USB: xhci: fix some compiler warnings in xhci.h

Guennadi Liakhovetski (1):
USB: gadget: Add i.MX3x support to the fsl_usb2_udc driver

H Hartley Sweeten (3):
USB: core/sysfs: fix sparse warnings
USB: host/ohci-hcd.c: fix sparse warnings
USB: hub.c: fix sparse warnings

Hao Wu (1):
USB: Add Intel Langwell USB OTG Transceiver Drive

Hermann Kneissel (1):
USB: garmin_gps: removes usb_reset_device from garmin_close

Jason Wessel (6):
USB: usb_debug, usb_generic_serial: implement multi urb write
USB: serial: ftd_sio usb: move status check
USB: serial: usb_debug,usb_generic_serial: implement sysrq and serial break
USB: serial: ftd_sio: implement sysrq handling on break
USB: pl2303 usb_serial: implement sysrq handling on break
USB: usb_serial: only allow sysrq on a console port

Josua Dietze (1):
USB: usb-storage: add filter to "option_ms" to leave unrecognized devices alone

Kay Sievers (1):
usb: convert endpoint devices to bus-less childs of the usb interface

Kir Kolyshkin (1):
USB: cdc-acm: quirk for Alcatel OT-I650

Mark Adamson (2):
USB: serial: FTDI: add high speed device support
USB: ftdi_sio: fix hi-speed device packet size calculation

Martin Fuzzey (1):
USB: usbtest fix endless loop in unlink tests.

Matthias Kaehlcke (6):
USB: ci13xxx_udc: use helper functions to determine endpoint type and direction
USB: atmel_usba_udc: use helper functions to determine endpoint type and direction
USB: at91_udc: use helper functions to determine endpoint type and direction
USB: Goku-S: use helper functions to determine endpoint type and direction
USB: gadgetfs: use helper functions to determine endpoint type and direction
USB: UHCI queue: use usb_endpoint_type()

Maulik Mankad (1):
USB: gadget : Fix RNDIS code to pass USB Compliance tests (USBCV) with g_ether

Michele Valzelli (1):
USB: option.c: add Toshiba 3G HSDPA SM-Bus Minicard device id

Nicolas Ferre (1):
USB: atmel_usba_udc: change way of specifying bias function

Niilo Minkkinen (1):
usb: musb: disable OTG AUTOIDLE only with omap3430

Oliver Neukum (1):
USB: support for cdc-acm of single interface devices

Pascal Terjan (1):
USB: Ignore storage device in modem mode on DWN-652

Paul Mundt (2):
wusb: hwa-hc: Drop unused pci_suspend/resume hooks.
USB: xhci depends on PCI.

Pete Zaitcev (1):
USB: janitor storage initializers

Randy Dunlap (2):
USB: composite.h: mark private struct members as private:
USB: usb.h: change private: kernel-doc for new format requirement

Richard Laager (1):
USB: Identify Novatel MC760 in option driver

Robert Jarzmik (2):
USB: pxa27x_udc: compatibility with pxa320 SoC
USB: pxa27x_udc: single-thread setup requests

Sarah Sharp (34):
USB: xhci: Support xHCI host controllers and USB 3.0 devices.
USB: xhci: BIOS handoff and HW initialization.
USB: xhci: Ring allocation and initialization.
USB: xhci: Device context array allocation.
USB: xhci: No-op command queueing and irq handler.
USB: Add SuperSpeed to the list of USB device speeds.
USB: Add USB 3.0 roothub support to USB core.
USB: Don't reset USB 3.0 devices on port change detection.
USB: Add route string to struct usb_device.
USB: xhci: Root hub support.
USB: Support for addressing a USB device under xHCI
USB: xhci: Allocate and address USB devices
USB: Support for submitting control URBs under xHCI.
USB: xhci: Control transfer support.
USB: Parse and store the SuperSpeed endpoint companion descriptors.
USB: Support for bandwidth allocation.
USB: xhci: Bandwidth allocation support
USB: xhci: Bulk transfer support
USB: Push scatter gather lists down to host controller drivers.
USB: xhci: Scatter gather list support for bulk transfers.
USB: xhci: URB cancellation support.
USB: xhci: Fix register write order.
USB: xhci: Fix Link TRB handoff bit twiddling.
USB: xhci: Avoid global namespace pollution.
USB: xhci: Clean up xhci_irq() function.
USB: xhci: Avoid compiler reordering in Link TRB giveback.
USB: Change names of SuperSpeed ep companion descriptor structs.
USB: xhci: drop spinlock in xhci_urb_enqueue() error path.
USB: xhci: Make xhci-mem.c include linux/dmapool.h
usb; xhci: Fix TRB offset calculations.
USB: xhci: Remove packed attribute from structures.
USB: xHCI: Fix interrupt moderation.
USB: xhci: Respect critical sections.
USB: xhci: Add Makefile, MAINTAINERS, and Kconfig entries.

Scott James Remnant (1):
USB: usbfs: deprecate and hide option for !embedded

Sergei Shtylyov (8):
musb_gadget: fix unhandled endpoint 0 IRQs
musb_gadget: suppress "parasitic" TX interrupts with CPPI
musb_host: refactor musb_save_toggle() (take 2)
musb_host: factor out musb_ep_{get|set}_qh()
musb_host: simplify check for active URB
musb_host: streamline musb_cleanup_urb() calls
musb_host: refactor URB giveback
musb: split out CPPI interrupt handler

Stephen Rothwell (1):
USB: xhci: use xhci_handle_event instead of handle_event

Tony Cook (1):
USB: mos7840: fix debug log messages

Uwe Kleine-K�nig (3):
USB: move twl4030_usb's probe function to .devinit.text
USB: move r8a66597_hcd's probe function to .devinit.text
USB: move orion-ehci's probe function to .devinit.text

Viral Mehta (1):
USB: xhci: replace if-elseif-else with switch-case

Xiaochen Shen (1):
USB: Add Intel Langwell USB Device Controller driver

Yoshihiro Shimoda (1):
USB: r8a66597-hcd: use platform_data instead of module_param

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majo...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Uwe Kleine-König

unread,
Jun 16, 2009, 2:20:12 AM6/16/09
to
Hi Greg,

On Mon, Jun 15, 2009 at 10:22:07PM -0700, Greg Kroah-Hartman wrote:
> A pointer to twl4030_usb_probe is passed to the core via
> platform_driver_register and so the function must not disappear when the
> .init sections are discarded. Otherwise (if also having HOTPLUG=y)
> unbinding and binding a device to the driver via sysfs will result in an
> oops as does a device being registered late.
>
> An alternative to this patch is using platform_driver_probe instead of
> platform_driver_register plus removing the pointer to the probe function
> from the struct platform_driver.
I wonder if this kind of error could be detected automatically. That is
at probe time check if the probe function is in the .init.text section.

Best regards
Uwe

--
Pengutronix e.K. | Uwe Kleine-K�nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |

Greg KH

unread,
Jun 16, 2009, 2:30:14 AM6/16/09
to
On Tue, Jun 16, 2009 at 08:05:59AM +0200, Uwe Kleine-K�nig wrote:
> Hi Greg,
>
> On Mon, Jun 15, 2009 at 10:22:07PM -0700, Greg Kroah-Hartman wrote:
> > A pointer to twl4030_usb_probe is passed to the core via
> > platform_driver_register and so the function must not disappear when the
> > .init sections are discarded. Otherwise (if also having HOTPLUG=y)
> > unbinding and binding a device to the driver via sysfs will result in an
> > oops as does a device being registered late.
> >
> > An alternative to this patch is using platform_driver_probe instead of
> > platform_driver_register plus removing the pointer to the probe function
> > from the struct platform_driver.
> I wonder if this kind of error could be detected automatically. That is
> at probe time check if the probe function is in the .init.text section.

There's nothing wrong with calling probe functions in the .init.text
section, _before_ we throw away the init.text section :)

So we would have to somehow know when that happens.

thanks,

greg k-h

Uwe Kleine-König

unread,
Jun 16, 2009, 5:20:10 AM6/16/09
to
Hi Greg,

On Mon, Jun 15, 2009 at 11:20:35PM -0700, Greg KH wrote:
> On Tue, Jun 16, 2009 at 08:05:59AM +0200, Uwe Kleine-K�nig wrote:
> > Hi Greg,
> >
> > On Mon, Jun 15, 2009 at 10:22:07PM -0700, Greg Kroah-Hartman wrote:
> > > A pointer to twl4030_usb_probe is passed to the core via
> > > platform_driver_register and so the function must not disappear when the
> > > .init sections are discarded. Otherwise (if also having HOTPLUG=y)
> > > unbinding and binding a device to the driver via sysfs will result in an
> > > oops as does a device being registered late.
> > >
> > > An alternative to this patch is using platform_driver_probe instead of
> > > platform_driver_register plus removing the pointer to the probe function
> > > from the struct platform_driver.
> > I wonder if this kind of error could be detected automatically. That is
> > at probe time check if the probe function is in the .init.text section.
>
> There's nothing wrong with calling probe functions in the .init.text
> section, _before_ we throw away the init.text section :)

Ah, my fault:

I wonder if this kind of error could be detected automatically. That is

at *register* time check if the probe function is in the .init.text
section.

Best regards
Uwe

--
Pengutronix e.K. | Uwe Kleine-K�nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |

Greg KH

unread,
Jun 16, 2009, 12:40:15 PM6/16/09
to
On Tue, Jun 16, 2009 at 11:14:44AM +0200, Uwe Kleine-K�nig wrote:
> Hi Greg,
>
> On Mon, Jun 15, 2009 at 11:20:35PM -0700, Greg KH wrote:
> > On Tue, Jun 16, 2009 at 08:05:59AM +0200, Uwe Kleine-K�nig wrote:
> > > Hi Greg,
> > >
> > > On Mon, Jun 15, 2009 at 10:22:07PM -0700, Greg Kroah-Hartman wrote:
> > > > A pointer to twl4030_usb_probe is passed to the core via
> > > > platform_driver_register and so the function must not disappear when the
> > > > .init sections are discarded. Otherwise (if also having HOTPLUG=y)
> > > > unbinding and binding a device to the driver via sysfs will result in an
> > > > oops as does a device being registered late.
> > > >
> > > > An alternative to this patch is using platform_driver_probe instead of
> > > > platform_driver_register plus removing the pointer to the probe function
> > > > from the struct platform_driver.
> > > I wonder if this kind of error could be detected automatically. That is
> > > at probe time check if the probe function is in the .init.text section.
> >
> > There's nothing wrong with calling probe functions in the .init.text
> > section, _before_ we throw away the init.text section :)
> Ah, my fault:
>
> I wonder if this kind of error could be detected automatically. That is
> at *register* time check if the probe function is in the .init.text
> section.

But again, we can register devices with their probe functions in
.init.text and use them, before .init.text is thrown away, right?

So I don't see an easy way to check this and keep people from doing
stupid things...

thanks,

greg k-h

Uwe Kleine-König

unread,
Jun 16, 2009, 2:00:19 PM6/16/09
to
Hello,

Yes, but only if you unregister the driver before .init.text is thrown
away, right?

If your driver is still active while .init.text already disappeared a new
device makes your kernel oops.

Best regards
Uwe

--
Pengutronix e.K. | Uwe Kleine-K�nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |

Greg KH

unread,
Jun 16, 2009, 2:10:10 PM6/16/09
to

Yes, but for almost all platform devices, they can not have a new device
appear after init runs, as they are fixed to the motherboard.

Anyway, if you want to send a patch to dynamically catch this kind of
problem, that would be great.

thanks,

greg k-h

Uwe Kleine-König

unread,
Jun 16, 2009, 2:30:14 PM6/16/09
to
Hello,

The same check could be implemented for drivers of the other bus types,
too.



> Anyway, if you want to send a patch to dynamically catch this kind of
> problem, that would be great.

I somehow feared that at one point someone wants a patch from me if I
ask if it's possible at all ... :-)

/me goes and searces if there is already a function to check if a
pointer points into .init.text.

Best regards
Uwe

--
Pengutronix e.K. | Uwe Kleine-K�nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |

Uwe Kleine-König

unread,
Jun 19, 2009, 9:50:16 AM6/19/09
to
Signed-off-by: Uwe Kleine-König <u.klein...@pengutronix.de>
---
drivers/base/platform.c | 42 ++++++++++++++++++++++++++++++++++++------
include/linux/kernel.h | 2 ++
include/linux/module.h | 12 ++++++++++++
kernel/extable.c | 12 ++++++++++++
kernel/module.c | 36 ++++++++++++++++++++++++++++++++++++
5 files changed, 98 insertions(+), 6 deletions(-)

diff --git a/drivers/base/platform.c b/drivers/base/platform.c
index 81cb01b..851ba84 100644
--- a/drivers/base/platform.c
+++ b/drivers/base/platform.c
@@ -470,11 +470,7 @@ static void platform_drv_shutdown(struct device *_dev)
drv->shutdown(dev);
}

-/**
- * platform_driver_register
- * @drv: platform driver structure
- */
-int platform_driver_register(struct platform_driver *drv)
+static int __platform_driver_register(struct platform_driver *drv)
{
drv->driver.bus = &platform_bus_type;
if (drv->probe)
@@ -489,6 +485,40 @@ int platform_driver_register(struct platform_driver *drv)

return driver_register(&drv->driver);
}
+
+/**
+ * platform_driver_register
+ * @drv: platform driver structure
+ */
+int platform_driver_register(struct platform_driver *drv)
+{
+ int ret = __platform_driver_register(drv);
+
+#if defined(CONFIG_HOTPLUG)
+ /*
+ * drivers that are registered by platform_driver_register
+ * should not have their probe function in .init.text. The
+ * reason is that a probe can happen after .init.text is
+ * discarded which then results in an oops. The alternatives
+ * are using .devinit.text for the probe function or "register"
+ * with platform_driver_probe.
+ */
+ if (drv->probe && kernel_init_text_address((unsigned long)drv->probe))
+ pr_warning("oops-warning: probe function of platform driver %s"
+ " lives in .init.text\n", drv->driver.name);
+#else
+ /*
+ * without HOTPLUG probe functions can be discarded after the driver is
+ * loaded.
+ * There is a little chance for false positives, namely if the driver is
+ * registered after the .init sections are discarded.
+ */
+ if (drv->probe && !kernel_init_text_address((unsigned long)drv->probe))
+ pr_info("probably the probe function of platform driver %s can"
+ " be moved to .init.text\n", drv->driver.name);
+#endif
+ return ret;
+}
EXPORT_SYMBOL_GPL(platform_driver_register);

/**
@@ -525,7 +555,7 @@ int __init_or_module platform_driver_probe(struct platform_driver *drv,

/* temporary section violation during probe() */
drv->probe = probe;
- retval = code = platform_driver_register(drv);
+ retval = code = __platform_driver_register(drv);

/* Fixup that section violation, being paranoid about code scanning
* the list of drivers in order to probe new devices. Check to see
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index c5a71c3..5db1817 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -203,8 +203,10 @@ extern char *get_options(const char *str, int nints, int *ints);
extern unsigned long long memparse(const char *ptr, char **retptr);

extern int core_kernel_text(unsigned long addr);
+extern int core_kernel_init_text(unsigned long addr)
extern int __kernel_text_address(unsigned long addr);
extern int kernel_text_address(unsigned long addr);
+extern int kernel_init_text_address(unsigned long addr);
extern int func_ptr_is_kernel_text(void *ptr);

struct pid;
diff --git a/include/linux/module.h b/include/linux/module.h
index 505f20d..ff07937 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -379,9 +379,11 @@ static inline int module_is_live(struct module *mod)
}

struct module *__module_text_address(unsigned long addr);
+struct module *__module_init_text_address(unsigned long addr);
struct module *__module_address(unsigned long addr);
bool is_module_address(unsigned long addr);
bool is_module_text_address(unsigned long addr);
+bool is_module_init_text_address(unsigned long addr);

static inline int within_module_core(unsigned long addr, struct module *mod)
{
@@ -550,6 +552,11 @@ static inline struct module *__module_text_address(unsigned long addr)
return NULL;
}

+static inline struct module *__module_init_text_address(unsigned long addr)
+{
+ return NULL;
+}
+
static inline bool is_module_address(unsigned long addr)
{
return false;
@@ -560,6 +567,11 @@ static inline bool is_module_text_address(unsigned long addr)
return false;
}

+static inline bool is_module_init_text_address(unsigned long addr)
+{
+ return false;
+}
+
/* Get/put a kernel symbol (calls should be symmetric) */
#define symbol_get(x) ({ extern typeof(x) x __attribute__((weak)); &(x); })
#define symbol_put(x) do { } while(0)
diff --git a/kernel/extable.c b/kernel/extable.c
index 7f8f263..bfd7bda 100644
--- a/kernel/extable.c
+++ b/kernel/extable.c
@@ -66,6 +66,11 @@ int core_kernel_text(unsigned long addr)
addr <= (unsigned long)_etext)
return 1;

+ return core_kernel_init_text;
+}
+
+int core_kernel_init_text(unsigned long addr)
+{
if (system_state == SYSTEM_BOOTING &&
init_kernel_text(addr))
return 1;
@@ -98,6 +103,13 @@ int kernel_text_address(unsigned long addr)
return is_module_text_address(addr);
}

+int kernel_init_text_address(unsigned long addr)
+{
+ if (core_kernel_init_text(addr))
+ return 1;
+ return is_module_init_text_address(addr);
+}
+
/*
* On some architectures (PPC64, IA64) function pointers
* are actually only tokens to some data that then holds the
diff --git a/kernel/module.c b/kernel/module.c
index 215aaab..a637213 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -2874,6 +2874,22 @@ bool is_module_text_address(unsigned long addr)
}

/*
+ * is_module_init_text_address - is this address inside a module's .init.text
+ * section?
+ * @addr: the address to check.
+ */
+bool is_module_init_text_address(unsigned long addr)
+{
+ bool ret;
+
+ preempt_disable();
+ ret = __module_init_text_address(addr) != NULL;
+ preempt_enable();
+
+ return ret;
+}
+
+/*
* __module_text_address - get the module whose code contains an address.
* @addr: the address.
*
@@ -2893,6 +2909,26 @@ struct module *__module_text_address(unsigned long addr)
}
EXPORT_SYMBOL_GPL(__module_text_address);

+/*
+ * __module_init_text_address - get the module whose .init.text contains an
+ * address.
+ * @addr: the address.
+ *
+ * Must be called with preempt disabled or module mutex held so that
+ * module doesn't get freed during this.
+ */
+struct module *__module_init_text_address(unsigned long addr)
+{
+ struct module *mod = __module_address(addr);
+ if (mod) {
+ /* Make sure it's within the .init.text section. */
+ if (!within(addr, mod->module_init, mod->init_text_size))
+ mod = NULL;
+ }
+ return mod;
+}
+EXPORT_SYMBOL_GPL(__module_init_text_address);
+
/* Don't grab lock, we're oopsing. */
void print_modules(void)
{
--
1.6.3.1

Greg KH

unread,
Jun 19, 2009, 10:20:13 AM6/19/09
to
On Fri, Jun 19, 2009 at 03:42:19PM +0200, Uwe Kleine-K�nig wrote:
> Signed-off-by: Uwe Kleine-K�nig <u.klein...@pengutronix.de>

That's not true, remember, drivers built into the system, like platform
ones, can have their probe function in .init.text, as it will be called
before we discard .init.text, and will never be called again as the
device will never be "hot added" at any future time.

So this could trigger a lot of false positives :(

thanks,

greg k-h

Uwe Kleine-König

unread,
Jun 19, 2009, 10:50:14 AM6/19/09
to
Hi Greg,

IMHO this is not a false positive. You can still do

for f in unbind bind do echo $deviceid > /sys/bus/platform/drivers/$drivername/$f; done

This type of driver should use platform_driver_probe.

Best regards
Uwe

--
Pengutronix e.K. | Uwe Kleine-K�nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |

Uwe Kleine-König

unread,
Jun 29, 2009, 4:00:15 AM6/29/09
to
Hi Greg,

Are you conviced and took the patch or did you give up to convince me?

I still think the patch is correct and I'd like to have it applied.

Greg KH

unread,
Jul 10, 2009, 11:40:06 PM7/10/09
to

Heh, no, sorry, it got burried in my queue.

> I still think the patch is correct and I'd like to have it applied.

Ok, let's test it out in the linux-next tree for a while to make sure it
works properly. Care to send me an updated version?

thanks,

greg k-h

Uwe Kleine-König

unread,
Jul 11, 2009, 6:10:11 AM7/11/09
to
Hi Greg,

> > Are you conviced and took the patch or did you give up to convince me?
>
> Heh, no, sorry, it got burried in my queue.
>
> > I still think the patch is correct and I'd like to have it applied.
>
> Ok, let's test it out in the linux-next tree for a while to make sure it
> works properly. Care to send me an updated version?

I updated to latest Linus' master. It applies to linux-next from
Fri Jul 10 14:44:30 2009 +1000 as is.

Back some time I sent a series that fixes many of these bugs. I will
update it later today and resend.

Best regards and thanks,
Uwe

---->8----
From: Uwe Kleine-K�nig <u.klein...@pengutronix.de>
Subject: [PATCH] platform_driver_register: warn if probe is in .init.text

with HOTPLUG=y it's wrong to register a platform_driver whose probe
function lives in .init.text because the probe function can be called
(e.g. via sysfs or by registering a device late) after the init sections
are already discarded. This results in an oops.

So warn if such a driver is registered.

Without HOTPLUG the probe function can (and should) be discarded if the
driver is registered while the init sections are still available.
In this case warn if the probe function isn't discarded later. (As
described in the comments there is a small chance for a wrong warning.
But as HOTPLUG=n is unusual today and the situation is strage enough to
be cleaned up anyhow, I think this is OK.)

index d6320a3..298e9bc 100644


--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -203,8 +203,10 @@ extern char *get_options(const char *str, int nints, int *ints);
extern unsigned long long memparse(const char *ptr, char **retptr);

extern int core_kernel_text(unsigned long addr);
+extern int core_kernel_init_text(unsigned long addr)
extern int __kernel_text_address(unsigned long addr);
extern int kernel_text_address(unsigned long addr);
+extern int kernel_init_text_address(unsigned long addr);
extern int func_ptr_is_kernel_text(void *ptr);

struct pid;
diff --git a/include/linux/module.h b/include/linux/module.h

index 098bdb7..93f47c4 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -385,9 +385,11 @@ static inline int module_is_live(struct module *mod)


}

struct module *__module_text_address(unsigned long addr);
+struct module *__module_init_text_address(unsigned long addr);
struct module *__module_address(unsigned long addr);
bool is_module_address(unsigned long addr);
bool is_module_text_address(unsigned long addr);
+bool is_module_init_text_address(unsigned long addr);

static inline int within_module_core(unsigned long addr, struct module *mod)
{

@@ -556,6 +558,11 @@ static inline struct module *__module_text_address(unsigned long addr)


return NULL;
}

+static inline struct module *__module_init_text_address(unsigned long addr)
+{
+ return NULL;
+}
+
static inline bool is_module_address(unsigned long addr)
{
return false;

@@ -566,6 +573,11 @@ static inline bool is_module_text_address(unsigned long addr)

index 0a04983..f1fbeb0 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -2890,6 +2890,22 @@ bool is_module_text_address(unsigned long addr)


}

/*
+ * is_module_init_text_address - is this address inside a module's .init.text
+ * section?
+ * @addr: the address to check.
+ */
+bool is_module_init_text_address(unsigned long addr)
+{
+ bool ret;
+
+ preempt_disable();
+ ret = __module_init_text_address(addr) != NULL;
+ preempt_enable();
+
+ return ret;
+}
+
+/*
* __module_text_address - get the module whose code contains an address.
* @addr: the address.
*

@@ -2909,6 +2925,26 @@ struct module *__module_text_address(unsigned long addr)


}
EXPORT_SYMBOL_GPL(__module_text_address);

+/*
+ * __module_init_text_address - get the module whose .init.text contains an
+ * address.
+ * @addr: the address.
+ *
+ * Must be called with preempt disabled or module mutex held so that
+ * module doesn't get freed during this.
+ */
+struct module *__module_init_text_address(unsigned long addr)
+{
+ struct module *mod = __module_address(addr);
+ if (mod) {
+ /* Make sure it's within the .init.text section. */
+ if (!within(addr, mod->module_init, mod->init_text_size))
+ mod = NULL;
+ }
+ return mod;
+}
+EXPORT_SYMBOL_GPL(__module_init_text_address);
+
/* Don't grab lock, we're oopsing. */
void print_modules(void)
{
--

tg: (f00caa7..) t/platsection/warn_in_probe (depends on: linus/master)

--
Pengutronix e.K. | Uwe Kleine-K�nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |

Greg KH

unread,
Jul 11, 2009, 1:30:12 PM7/11/09
to
On Sat, Jul 11, 2009 at 12:00:14PM +0200, Uwe Kleine-K�nig wrote:
> Hi Greg,
>
> > > Are you conviced and took the patch or did you give up to convince me?
> >
> > Heh, no, sorry, it got burried in my queue.
> >
> > > I still think the patch is correct and I'd like to have it applied.
> >
> > Ok, let's test it out in the linux-next tree for a while to make sure it
> > works properly. Care to send me an updated version?
> I updated to latest Linus' master. It applies to linux-next from
> Fri Jul 10 14:44:30 2009 +1000 as is.

Thanks, I'll apply it later today to my trees.

> Back some time I sent a series that fixes many of these bugs. I will
> update it later today and resend.

Thanks, that would be good to have, to keep the noise down for devices
we already know about.

thanks,

greg k-h

Greg KH

unread,
Jul 11, 2009, 3:10:10 PM7/11/09
to
On Sat, Jul 11, 2009 at 12:00:14PM +0200, Uwe Kleine-König wrote:
> Hi Greg,
>
> > > Are you conviced and took the patch or did you give up to convince me?
> >
> > Heh, no, sorry, it got burried in my queue.
> >
> > > I still think the patch is correct and I'd like to have it applied.
> >
> > Ok, let's test it out in the linux-next tree for a while to make sure it
> > works properly. Care to send me an updated version?
> I updated to latest Linus' master. It applies to linux-next from
> Fri Jul 10 14:44:30 2009 +1000 as is.
>
> Back some time I sent a series that fixes many of these bugs. I will
> update it later today and resend.
>
> Best regards and thanks,
> Uwe
>
> ---->8----
> From: Uwe Kleine-König <u.klein...@pengutronix.de>

> Subject: [PATCH] platform_driver_register: warn if probe is in .init.text
>
> with HOTPLUG=y it's wrong to register a platform_driver whose probe
> function lives in .init.text because the probe function can be called
> (e.g. via sysfs or by registering a device late) after the init sections
> are already discarded. This results in an oops.
>
> So warn if such a driver is registered.
>
> Without HOTPLUG the probe function can (and should) be discarded if the
> driver is registered while the init sections are still available.
> In this case warn if the probe function isn't discarded later. (As
> described in the comments there is a small chance for a wrong warning.
> But as HOTPLUG=n is unusual today and the situation is strage enough to
> be cleaned up anyhow, I think this is OK.)
>
> Signed-off-by: Uwe Kleine-König <u.klein...@pengutronix.de>

This code kills the build in very bad ways :(

So much so that the error messages scroll away, but it starts out with:

In file included from /home/gregkh/work/linux/gregkh-2.6/arch/x86/include/asm/percpu.h:45,
from /home/gregkh/work/linux/gregkh-2.6/arch/x86/include/asm/current.h:5,
from /home/gregkh/work/linux/gregkh-2.6/arch/x86/include/asm/processor.h:15,
from /home/gregkh/work/linux/gregkh-2.6/arch/x86/include/asm/atomic_32.h:6,
from /home/gregkh/work/linux/gregkh-2.6/arch/x86/include/asm/atomic.h:2,
from include/linux/crypto.h:20,
from arch/x86/kernel/asm-offsets_32.c:7,
from arch/x86/kernel/asm-offsets.c:2:
include/linux/kernel.h: In function ‘core_kernel_init_text’:
include/linux/kernel.h:207: error: storage class specified for parameter ‘__kernel_text_address’
include/linux/kernel.h:208: error: storage class specified for parameter ‘kernel_text_address’
include/linux/kernel.h:209: error: storage class specified for parameter ‘kernel_init_text_address’
include/linux/kernel.h:210: error: storage class specified for parameter ‘func_ptr_is_kernel_text’
include/linux/kernel.h:212: warning: empty declaration


Care to respin this?

thanks,

greg k-h

Uwe Kleine-König

unread,
Jul 11, 2009, 4:50:09 PM7/11/09
to
Hello Greg,

On Sat, Jul 11, 2009 at 11:59:20AM -0700, Greg KH wrote:


> On Sat, Jul 11, 2009 at 12:00:14PM +0200, Uwe Kleine-K�nig wrote:
> > Hi Greg,
> >
> > > > Are you conviced and took the patch or did you give up to convince me?
> > >
> > > Heh, no, sorry, it got burried in my queue.
> > >
> > > > I still think the patch is correct and I'd like to have it applied.
> > >
> > > Ok, let's test it out in the linux-next tree for a while to make sure it
> > > works properly. Care to send me an updated version?
> > I updated to latest Linus' master. It applies to linux-next from
> > Fri Jul 10 14:44:30 2009 +1000 as is.
> >
> > Back some time I sent a series that fixes many of these bugs. I will
> > update it later today and resend.
> >
> > Best regards and thanks,
> > Uwe
> >
> > ---->8----

> > From: Uwe Kleine-K�nig <u.klein...@pengutronix.de>


> > Subject: [PATCH] platform_driver_register: warn if probe is in .init.text
> >
> > with HOTPLUG=y it's wrong to register a platform_driver whose probe
> > function lives in .init.text because the probe function can be called
> > (e.g. via sysfs or by registering a device late) after the init sections
> > are already discarded. This results in an oops.
> >
> > So warn if such a driver is registered.
> >
> > Without HOTPLUG the probe function can (and should) be discarded if the
> > driver is registered while the init sections are still available.
> > In this case warn if the probe function isn't discarded later. (As
> > described in the comments there is a small chance for a wrong warning.
> > But as HOTPLUG=n is unusual today and the situation is strage enough to
> > be cleaned up anyhow, I think this is OK.)
> >

> > Signed-off-by: Uwe Kleine-K�nig <u.klein...@pengutronix.de>


>
> This code kills the build in very bad ways :(

it's just a ; that didn't made it into the new version. Don't know why.

If you squash the patch below into the patch I sent it should work
again.

Sorry
Uwe

diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index 298e9bc..2d48087 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -203,7 +203,7 @@ extern char *get_options(const char *str, int nints, int *ints);


extern unsigned long long memparse(const char *ptr, char **retptr);

extern int core_kernel_text(unsigned long addr);

-extern int core_kernel_init_text(unsigned long addr)


+extern int core_kernel_init_text(unsigned long addr);
extern int __kernel_text_address(unsigned long addr);
extern int kernel_text_address(unsigned long addr);

extern int kernel_init_text_address(unsigned long addr);

--
Pengutronix e.K. | Uwe Kleine-K�nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |

Uwe Kleine-König

unread,
Jul 11, 2009, 5:00:12 PM7/11/09
to
A pointer to corgi_ssp_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (when having HOTPLUG=y)

unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.

An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.

Signed-off-by: Uwe Kleine-König <u.klein...@pengutronix.de>
Cc: Eric Miao <eric...@marvell.com>
Cc: Russell King <rmk+k...@arm.linux.org.uk>
Cc: Paul Sokolovsky <pmi...@gmail.com>
Cc: Richard Purdie <rpu...@rpsys.net>
Cc: Liam Girdwood <liam.g...@wolfsonmicro.com>
Cc: Andrew Morton <ak...@linux-foundation.org>
---
arch/arm/mach-pxa/corgi_ssp.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-pxa/corgi_ssp.c b/arch/arm/mach-pxa/corgi_ssp.c
index a5ee707..1d9bc11 100644
--- a/arch/arm/mach-pxa/corgi_ssp.c
+++ b/arch/arm/mach-pxa/corgi_ssp.c
@@ -204,7 +204,7 @@ void __init corgi_ssp_set_machinfo(struct corgissp_machinfo *machinfo)
ssp_machinfo = machinfo;
}

-static int __init corgi_ssp_probe(struct platform_device *dev)
+static int __devinit corgi_ssp_probe(struct platform_device *dev)
{
int ret;

--
1.6.3.1

Uwe Kleine-König

unread,
Jul 11, 2009, 5:00:13 PM7/11/09
to
A pointer to hitfb_probe is passed to the core via

platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)

unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.

An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.

Signed-off-by: Uwe Kleine-König <u.klein...@pengutronix.de>
Cc: Paul Mundt <let...@linux-sh.org>
Cc: Andriy Skulysh <asku...@gmail.com>
Cc: Antonino Daplas <ada...@pol.net>


Cc: Andrew Morton <ak...@linux-foundation.org>
---

drivers/video/hitfb.c | 2 +-


1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/video/hitfb.c b/drivers/video/hitfb.c
index e7116a6..3016cd2 100644
--- a/drivers/video/hitfb.c
+++ b/drivers/video/hitfb.c
@@ -325,7 +325,7 @@ static struct fb_ops hitfb_ops = {
.fb_imageblit = cfb_imageblit,
};

-static int __init hitfb_probe(struct platform_device *dev)
+static int __devinit hitfb_probe(struct platform_device *dev)
{
unsigned short lcdclor, ldr3, ldvndr;
struct fb_info *info;

Uwe Kleine-König

unread,
Jul 11, 2009, 5:00:10 PM7/11/09
to
A pointer to sa1100fb_probe is passed to the core via

platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.

An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.

Signed-off-by: Uwe Kleine-König <u.klein...@pengutronix.de>
Cc: Russell King <rmk+k...@arm.linux.org.uk>
Cc: Matthias Kaehlcke <matt...@kaehlcke.net>
Cc: Andrew Morton <ak...@linux-foundation.org>
Cc: Antonino Daplas <ada...@gmail.com>
Cc: Pavel Machek <pa...@suse.cz>
Cc: Christoph Hellwig <h...@lst.de>
---
drivers/video/sa1100fb.c | 2 +-


1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/video/sa1100fb.c b/drivers/video/sa1100fb.c
index 10ddad8..19c012b 100644
--- a/drivers/video/sa1100fb.c
+++ b/drivers/video/sa1100fb.c
@@ -1435,7 +1435,7 @@ static struct sa1100fb_info * __init sa1100fb_init_fbinfo(struct device *dev)
return fbi;
}

-static int __init sa1100fb_probe(struct platform_device *pdev)
+static int __devinit sa1100fb_probe(struct platform_device *pdev)
{
struct sa1100fb_info *fbi;
int ret, irq;

Uwe Kleine-König

unread,
Jul 11, 2009, 5:00:12 PM7/11/09
to
A pointer to sgiseeq_probe is passed to the core via

platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.

An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.

Signed-off-by: Uwe Kleine-König <u.klein...@pengutronix.de>
Cc: Wang Chen <wang...@cn.fujitsu.com>
Cc: David S. Miller <da...@davemloft.net>
Cc: Andrew Morton <ak...@linux-foundation.org>
Cc: Jeff Garzik <jga...@redhat.com>
Cc: Thomas Bogendoerfer <tsbo...@alpha.franken.de>
Acked-by: Ralf Baechle <ra...@linux-mips.org>
---
drivers/net/sgiseeq.c | 2 +-


1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/sgiseeq.c b/drivers/net/sgiseeq.c
index 5fb88ca..53fa4f6 100644
--- a/drivers/net/sgiseeq.c
+++ b/drivers/net/sgiseeq.c
@@ -720,7 +720,7 @@ static const struct net_device_ops sgiseeq_netdev_ops = {
.ndo_validate_addr = eth_validate_addr,
};

-static int __init sgiseeq_probe(struct platform_device *pdev)
+static int __devinit sgiseeq_probe(struct platform_device *pdev)
{
struct sgiseeq_platform_data *pd = pdev->dev.platform_data;
struct hpc3_regs *hpcregs = pd->hpc;

Uwe Kleine-König

unread,
Jul 11, 2009, 5:00:14 PM7/11/09
to
A pointer to jornada_ssp_probe is passed to the core via

platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.

An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.

Signed-off-by: Uwe Kleine-König <u.klein...@pengutronix.de>
Acked-by: Kristoffer Ericson <Kristoffe...@gmail.com>
Cc: Russell King <rmk+k...@arm.linux.org.uk>


Cc: Andrew Morton <ak...@linux-foundation.org>
---

arch/arm/mach-sa1100/jornada720_ssp.c | 2 +-


1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-sa1100/jornada720_ssp.c b/arch/arm/mach-sa1100/jornada720_ssp.c
index 506a5e5..9b6dee5 100644
--- a/arch/arm/mach-sa1100/jornada720_ssp.c
+++ b/arch/arm/mach-sa1100/jornada720_ssp.c
@@ -130,7 +130,7 @@ void jornada_ssp_end(void)
};
EXPORT_SYMBOL(jornada_ssp_end);

-static int __init jornada_ssp_probe(struct platform_device *dev)
+static int __devinit jornada_ssp_probe(struct platform_device *dev)
{
int ret;

Uwe Kleine-König

unread,
Jul 11, 2009, 5:00:14 PM7/11/09
to
A pointer to mac_sonic_probe is passed to the core via

platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.

Various other functions that are called by mac_sonic_probe need to move
to .devinit.text, too.

An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.

Signed-off-by: Uwe Kleine-König <u.klein...@pengutronix.de>
Cc: Jeff Garzik <jga...@redhat.com>


Cc: David S. Miller <da...@davemloft.net>

Cc: Finn Thain <fth...@telegraphics.com.au>
Cc: Geert Uytterhoeven <ge...@linux-m68k.org>


Cc: Andrew Morton <ak...@linux-foundation.org>
---

drivers/net/macsonic.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/net/macsonic.c b/drivers/net/macsonic.c
index acd143d..8f492c7 100644
--- a/drivers/net/macsonic.c
+++ b/drivers/net/macsonic.c
@@ -179,7 +179,7 @@ static const struct net_device_ops macsonic_netdev_ops = {
.ndo_set_mac_address = eth_mac_addr,
};

-static int __init macsonic_init(struct net_device *dev)
+static int __devinit macsonic_init(struct net_device *dev)
{
struct sonic_local* lp = netdev_priv(dev);

@@ -223,7 +223,7 @@ static int __init macsonic_init(struct net_device *dev)
return 0;
}

-static int __init mac_onboard_sonic_ethernet_addr(struct net_device *dev)
+static int __devinit mac_onboard_sonic_ethernet_addr(struct net_device *dev)
{
struct sonic_local *lp = netdev_priv(dev);
const int prom_addr = ONBOARD_SONIC_PROM_BASE;
@@ -288,7 +288,7 @@ static int __init mac_onboard_sonic_ethernet_addr(struct net_device *dev)
} else return 0;
}

-static int __init mac_onboard_sonic_probe(struct net_device *dev)
+static int __devinit mac_onboard_sonic_probe(struct net_device *dev)
{
/* Bwahahaha */
static int once_is_more_than_enough;
@@ -409,7 +409,7 @@ static int __init mac_onboard_sonic_probe(struct net_device *dev)
return macsonic_init(dev);
}

-static int __init mac_nubus_sonic_ethernet_addr(struct net_device *dev,
+static int __devinit mac_nubus_sonic_ethernet_addr(struct net_device *dev,
unsigned long prom_addr,
int id)
{
@@ -424,7 +424,7 @@ static int __init mac_nubus_sonic_ethernet_addr(struct net_device *dev,
return 0;
}

-static int __init macsonic_ident(struct nubus_dev *ndev)
+static int __devinit macsonic_ident(struct nubus_dev *ndev)
{
if (ndev->dr_hw == NUBUS_DRHW_ASANTE_LC &&
ndev->dr_sw == NUBUS_DRSW_SONIC_LC)
@@ -449,7 +449,7 @@ static int __init macsonic_ident(struct nubus_dev *ndev)
return -1;
}

-static int __init mac_nubus_sonic_probe(struct net_device *dev)
+static int __devinit mac_nubus_sonic_probe(struct net_device *dev)
{
static int slots;
struct nubus_dev* ndev = NULL;
@@ -562,7 +562,7 @@ static int __init mac_nubus_sonic_probe(struct net_device *dev)
return macsonic_init(dev);
}

-static int __init mac_sonic_probe(struct platform_device *pdev)
+static int __devinit mac_sonic_probe(struct platform_device *pdev)
{
struct net_device *dev;
struct sonic_local *lp;

Uwe Kleine-König

unread,
Jul 11, 2009, 5:00:15 PM7/11/09
to
A pointer to hp_wmi_bios_setup is passed to the core via

platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.

An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.

Signed-off-by: Uwe Kleine-König <u.klein...@pengutronix.de>
Cc: Frans Pop <ele...@planet.nl>
Cc: Larry Finger <Larry....@lwfinger.net>
Cc: Len Brown <le...@kernel.org>
Cc: Helge Deller <del...@gmx.de>
Cc: Matthew Garrett <m...@redhat.com>


Cc: Andrew Morton <ak...@linux-foundation.org>
---

drivers/platform/x86/hp-wmi.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/platform/x86/hp-wmi.c b/drivers/platform/x86/hp-wmi.c
index ca50856..f1f7090 100644
--- a/drivers/platform/x86/hp-wmi.c
+++ b/drivers/platform/x86/hp-wmi.c
@@ -51,7 +51,7 @@ MODULE_ALIAS("wmi:5FB7F034-2C63-45e9-BE91-3D44E2C707E4");
#define HPWMI_WIRELESS_QUERY 0x5
#define HPWMI_HOTKEY_QUERY 0xc

-static int __init hp_wmi_bios_setup(struct platform_device *device);
+static int __devinit hp_wmi_bios_setup(struct platform_device *device);
static int __exit hp_wmi_bios_remove(struct platform_device *device);
static int hp_wmi_resume_handler(struct platform_device *device);

@@ -425,7 +425,7 @@ static void cleanup_sysfs(struct platform_device *device)
device_remove_file(&device->dev, &dev_attr_tablet);
}

-static int __init hp_wmi_bios_setup(struct platform_device *device)
+static int __devinit hp_wmi_bios_setup(struct platform_device *device)
{
int err;
int wireless = hp_wmi_perform_query(HPWMI_WIRELESS_QUERY, 0, 0);

Uwe Kleine-König

unread,
Jul 11, 2009, 5:00:16 PM7/11/09
to
A pointer to clevo_mail_led_probe is passed to the core via

platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.

An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.

Signed-off-by: Uwe Kleine-König <u.klein...@pengutronix.de>
Cc: Richard Purdie <rpu...@linux.intel.com>
Cc: Andrew Morton <ak...@linux-foundation.org>
Cc: Márton Németh <nm...@freemail.hu>
---
drivers/leds/leds-clevo-mail.c | 2 +-


1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/leds/leds-clevo-mail.c b/drivers/leds/leds-clevo-mail.c
index 1813c84..8ee83ce 100644
--- a/drivers/leds/leds-clevo-mail.c
+++ b/drivers/leds/leds-clevo-mail.c
@@ -145,7 +145,7 @@ static struct led_classdev clevo_mail_led = {
.flags = LED_CORE_SUSPENDRESUME,
};

-static int __init clevo_mail_led_probe(struct platform_device *pdev)
+static int __devinit clevo_mail_led_probe(struct platform_device *pdev)
{
return led_classdev_register(&pdev->dev, &clevo_mail_led);
}
--
1.6.3.1

Uwe Kleine-König

unread,
Jul 11, 2009, 5:00:16 PM7/11/09
to
A pointer to orion_nand_probe is passed to the core via

platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.

An alternative to this patch is using platform_driver_probe instead of


platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.

Signed-off-by: Uwe Kleine-König <u.klein...@pengutronix.de>
Cc: Lennert Buytenhek <buy...@marvell.com>
Cc: Saeed Bishara <sa...@marvell.com>
Cc: Jörn Engel <jo...@logfs.org>
Cc: Nicolas Pitre <ni...@marvell.com>
Cc: Tzachi Perelstein <tza...@marvell.com>


Cc: Andrew Morton <ak...@linux-foundation.org>
---

drivers/mtd/nand/orion_nand.c | 2 +-


1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/nand/orion_nand.c b/drivers/mtd/nand/orion_nand.c
index 7ad9722..748112c 100644
--- a/drivers/mtd/nand/orion_nand.c
+++ b/drivers/mtd/nand/orion_nand.c
@@ -69,7 +69,7 @@ static void orion_nand_read_buf(struct mtd_info *mtd, uint8_t *buf, int len)
buf[i++] = readb(io_base);
}

-static int __init orion_nand_probe(struct platform_device *pdev)
+static int __devinit orion_nand_probe(struct platform_device *pdev)
{
struct mtd_info *mtd;
struct nand_chip *nc;

Uwe Kleine-König

unread,
Jul 11, 2009, 5:00:16 PM7/11/09
to
A pointer to cfag12864bfb_probe is passed to the core via

platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.

An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.

Signed-off-by: Uwe Kleine-König <u.klein...@pengutronix.de>
Acked-by: Miguel Ojeda <miguel.oje...@gmail.com>
Cc: Andrew Morton <ak...@linux-foundation.org>
Cc: Avuton Olrich <avu...@gmail.com>
Cc: Antonino Daplas <ada...@gmail.com>
---
drivers/auxdisplay/cfag12864bfb.c | 2 +-


1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/auxdisplay/cfag12864bfb.c b/drivers/auxdisplay/cfag12864bfb.c
index fe3a865..b0ca5a4 100644
--- a/drivers/auxdisplay/cfag12864bfb.c
+++ b/drivers/auxdisplay/cfag12864bfb.c
@@ -81,7 +81,7 @@ static struct fb_ops cfag12864bfb_ops = {
.fb_mmap = cfag12864bfb_mmap,
};

-static int __init cfag12864bfb_probe(struct platform_device *device)
+static int __devinit cfag12864bfb_probe(struct platform_device *device)
{
int ret = -EINVAL;
struct fb_info *info = framebuffer_alloc(0, &device->dev);
--
1.6.3.1

Uwe Kleine-König

unread,
Jul 11, 2009, 5:00:17 PM7/11/09
to
A pointer to epson1355fb_probe is passed to the core via

platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)

unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.

An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.

Signed-off-by: Uwe Kleine-König <u.klein...@pengutronix.de>
Cc: Russell King <rmk+k...@arm.linux.org.uk>
Cc: Krzysztof Helt <krzysz...@wp.pl>
Cc: Antonino Daplas <ada...@gmail.com>
Cc: Andrew Morton <ak...@linux-foundation.org>
Cc: Paul Mundt <let...@linux-sh.org>
Cc: Roland Stigge <sti...@antcom.de>
Cc: Greg Kroah-Hartman <gre...@suse.de>
---
drivers/video/epson1355fb.c | 2 +-


1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/video/epson1355fb.c b/drivers/video/epson1355fb.c
index 2735b79..6d755bb 100644
--- a/drivers/video/epson1355fb.c
+++ b/drivers/video/epson1355fb.c
@@ -602,7 +602,7 @@ static int epson1355fb_remove(struct platform_device *dev)
return 0;
}

-int __init epson1355fb_probe(struct platform_device *dev)
+int __devinit epson1355fb_probe(struct platform_device *dev)
{
struct epson1355_par *default_par;
struct fb_info *info;

Uwe Kleine-König

unread,
Jul 11, 2009, 5:00:17 PM7/11/09
to
A pointer to efifb_probe is passed to the core via

platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)

unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.

An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.

Signed-off-by: Uwe Kleine-König <u.klein...@pengutronix.de>
Cc: Peter Jones <pjo...@redhat.com>
Cc: Krzysztof Helt <krzysz...@poczta.fm>
Cc: Geert Uytterhoeven <Geert.Uyt...@sonycom.com>
Cc: Jaya Kumar <jayakum...@gmail.com>
Cc: Ralf Baechle <ra...@linux-mips.org>
Cc: Maciej W. Rozycki <ma...@linux-mips.org>
Cc: Andrew Morton <ak...@linux-foundation.org>
Cc: Chandramouli Narayanan <mo...@linux.intel.com>
Cc: Huang Ying <ying....@intel.com>
---
drivers/video/efifb.c | 2 +-


1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/video/efifb.c b/drivers/video/efifb.c
index eb12182..2161f21 100644
--- a/drivers/video/efifb.c
+++ b/drivers/video/efifb.c
@@ -201,7 +201,7 @@ static int __init efifb_setup(char *options)
return 0;
}

-static int __init efifb_probe(struct platform_device *dev)
+static int __devinit efifb_probe(struct platform_device *dev)
{
struct fb_info *info;
int err;

Uwe Kleine-König

unread,
Jul 11, 2009, 5:00:19 PM7/11/09
to
Pointers to s3c2410fb_probe and s3c2412fb_probe are passed to the core
via platform_driver_register and so the functions must not disappear

when the .init sections are discarded. Otherwise (if also having
HOTPLUG=y) unbinding and binding a device to one of the drivers via

sysfs will result in an oops as does a device being registered late.

An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.

Signed-off-by: Uwe Kleine-König <u.klein...@pengutronix.de>
Cc: Russell King <rmk+k...@arm.linux.org.uk>
Cc: Ben Dooks <ben-...@fluff.org>
Cc: Arnaud Patard <arnaud...@rtp-net.org>
Cc: Krzysztof Helt <krzysz...@wp.pl>
Cc: Andrew Morton <ak...@linux-foundation.org>
Cc: Antonino Daplas <ada...@pol.net>
Cc: Vincent Sanders <vi...@simtec.co.uk>
---
drivers/video/s3c2410fb.c | 4 ++--


1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/video/s3c2410fb.c b/drivers/video/s3c2410fb.c
index 7da0027..b8269bd 100644
--- a/drivers/video/s3c2410fb.c
+++ b/drivers/video/s3c2410fb.c
@@ -1002,12 +1002,12 @@ dealloc_fb:
return ret;
}

-static int __init s3c2410fb_probe(struct platform_device *pdev)
+static int __devinit s3c2410fb_probe(struct platform_device *pdev)
{
return s3c24xxfb_probe(pdev, DRV_S3C2410);
}

-static int __init s3c2412fb_probe(struct platform_device *pdev)
+static int __devinit s3c2412fb_probe(struct platform_device *pdev)
{
return s3c24xxfb_probe(pdev, DRV_S3C2412);

Uwe Kleine-König

unread,
Jul 11, 2009, 5:00:18 PM7/11/09
to
A pointer to acornfb_probe is passed to the core via
platform_driver_register and so the function must not disappear when the

.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an

oops as does a device being registered late.

An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.

Signed-off-by: Uwe Kleine-König <u.klein...@pengutronix.de>
Cc: Christoph Hellwig <h...@lst.de>
Cc: Antonino Daplas <ada...@pol.net>
Cc: linux-fb...@lists.sourceforge.net


Cc: Andrew Morton <ak...@linux-foundation.org>
---

drivers/video/acornfb.c | 2 +-


1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/video/acornfb.c b/drivers/video/acornfb.c
index 0bcc59e..43d7d50 100644
--- a/drivers/video/acornfb.c
+++ b/drivers/video/acornfb.c
@@ -1221,7 +1221,7 @@ free_unused_pages(unsigned int virtual_start, unsigned int virtual_end)
printk("acornfb: freed %dK memory\n", mb_freed);
}

-static int __init acornfb_probe(struct platform_device *dev)
+static int __devinit acornfb_probe(struct platform_device *dev)
{
unsigned long size;
u_int h_sync, v_sync;
--
1.6.3.1

Uwe Kleine-König

unread,
Jul 11, 2009, 5:00:19 PM7/11/09
to
A pointer to gbefb_probe is passed to the core via

platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.

An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.

Signed-off-by: Uwe Kleine-König <u.klein...@pengutronix.de>
Cc: Roel Kluin <roel....@gmail.com>
Cc: Krzysztof Helt <krzysz...@poczta.fm>
Cc: Thomas Bogendoerfer <tsbo...@alpha.franken.de>
Cc: Andrew Morton <ak...@linux-foundation.org>
Cc: Antonino Daplas <ada...@pol.net>
Cc: Kaj-Michael Lang <mil...@tal.org>
Cc: Martin Michlmayr <t...@cyrius.com>
Cc: Joshua Kinard <ku...@gentoo.org>
---
drivers/video/gbefb.c | 2 +-


1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/video/gbefb.c b/drivers/video/gbefb.c
index 1a83709..f30e6b7 100644
--- a/drivers/video/gbefb.c
+++ b/drivers/video/gbefb.c
@@ -1128,7 +1128,7 @@ static int __init gbefb_setup(char *options)
return 0;
}

-static int __init gbefb_probe(struct platform_device *p_dev)
+static int __devinit gbefb_probe(struct platform_device *p_dev)
{
int i, ret = 0;

Uwe Kleine-König

unread,
Jul 11, 2009, 5:00:20 PM7/11/09
to
A pointer to cobalt_lcdfb_probe is passed to the core via

platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.

An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.

Signed-off-by: Uwe Kleine-König <u.klein...@pengutronix.de>
Cc: Yoichi Yuasa <yoichi...@tripeaks.co.jp>
Cc: Krzysztof Helt <krzysz...@poczta.fm>
Cc: Antonino Daplas <ada...@pol.net>
Acked-by: Ralf Baechle <ra...@linux-mips.org>


Cc: Andrew Morton <ak...@linux-foundation.org>
---

drivers/video/cobalt_lcdfb.c | 2 +-


1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/video/cobalt_lcdfb.c b/drivers/video/cobalt_lcdfb.c
index 108b89e..5eb61b5 100644
--- a/drivers/video/cobalt_lcdfb.c
+++ b/drivers/video/cobalt_lcdfb.c
@@ -287,7 +287,7 @@ static struct fb_ops cobalt_lcd_fbops = {
.fb_cursor = cobalt_lcdfb_cursor,
};

-static int __init cobalt_lcdfb_probe(struct platform_device *dev)
+static int __devinit cobalt_lcdfb_probe(struct platform_device *dev)
{
struct fb_info *info;
struct resource *res;

Uwe Kleine-König

unread,
Jul 11, 2009, 5:00:22 PM7/11/09
to
A pointer to q40fb_probe is passed to the core via

platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.

An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.

Signed-off-by: Uwe Kleine-König <u.klein...@pengutronix.de>
Cc: Antonino Daplas <ada...@gmail.com>


Cc: Andrew Morton <ak...@linux-foundation.org>
---

drivers/video/q40fb.c | 2 +-


1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/video/q40fb.c b/drivers/video/q40fb.c
index 4beac1d..de40a62 100644
--- a/drivers/video/q40fb.c
+++ b/drivers/video/q40fb.c
@@ -85,7 +85,7 @@ static struct fb_ops q40fb_ops = {
.fb_imageblit = cfb_imageblit,
};

-static int __init q40fb_probe(struct platform_device *dev)
+static int __devinit q40fb_probe(struct platform_device *dev)
{
struct fb_info *info;

Uwe Kleine-König

unread,
Jul 11, 2009, 5:00:21 PM7/11/09
to
A pointer to arcfb_probe is passed to the core via

platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.

An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.

Signed-off-by: Uwe Kleine-König <u.klein...@pengutronix.de>
Cc: Antonino Daplas <ada...@gmail.com>


Cc: Andrew Morton <ak...@linux-foundation.org>
---

drivers/video/arcfb.c | 2 +-


1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/video/arcfb.c b/drivers/video/arcfb.c
index c343169..01554d6 100644
--- a/drivers/video/arcfb.c
+++ b/drivers/video/arcfb.c
@@ -504,7 +504,7 @@ static struct fb_ops arcfb_ops = {
.fb_ioctl = arcfb_ioctl,
};

-static int __init arcfb_probe(struct platform_device *dev)
+static int __devinit arcfb_probe(struct platform_device *dev)
{
struct fb_info *info;
int retval = -ENOMEM;

Uwe Kleine-König

unread,
Jul 11, 2009, 5:00:19 PM7/11/09
to
A pointer to am79c961_probe is passed to the core via

platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.

An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.

Signed-off-by: Uwe Kleine-König <u.klein...@pengutronix.de>
Cc: Roel Kluin <12...@tiscali.nl>
Cc: Russell King <rmk+k...@arm.linux.org.uk>
Cc: net...@vger.kernel.org


Cc: Andrew Morton <ak...@linux-foundation.org>
---

drivers/net/arm/am79c961a.c | 2 +-


1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/arm/am79c961a.c b/drivers/net/arm/am79c961a.c
index 627bc75..51b19f2 100644
--- a/drivers/net/arm/am79c961a.c
+++ b/drivers/net/arm/am79c961a.c
@@ -680,7 +680,7 @@ static const struct net_device_ops am79c961_netdev_ops = {
#endif
};

-static int __init am79c961_probe(struct platform_device *pdev)
+static int __devinit am79c961_probe(struct platform_device *pdev)
{
struct resource *res;
struct net_device *dev;

Uwe Kleine-König

unread,
Jul 11, 2009, 5:10:08 PM7/11/09
to
A pointer to at91ether_probe is passed to the core via

platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.

An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.

Signed-off-by: Uwe Kleine-König <u.klein...@pengutronix.de>


Cc: David S. Miller <da...@davemloft.net>

Cc: David Brownell <dbro...@users.sourceforge.net>
Cc: Jeff Garzik <jga...@redhat.com>
Cc: Paulius Zaleckas <paulius....@teltonika.lt>
Cc: Marc Pignat <marc....@hevs.ch>
Cc: Andrew Victor <li...@maxim.org.za>
Cc: Roel Kluin <12...@tiscali.nl>


Cc: Andrew Morton <ak...@linux-foundation.org>
---

drivers/net/arm/at91_ether.c | 2 +-


1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/arm/at91_ether.c b/drivers/net/arm/at91_ether.c
index 2e7419a..0c8860e 100644
--- a/drivers/net/arm/at91_ether.c
+++ b/drivers/net/arm/at91_ether.c
@@ -1119,7 +1119,7 @@ static int __init at91ether_setup(unsigned long phy_type, unsigned short phy_add
/*
* Detect MAC and PHY and perform initialization
*/
-static int __init at91ether_probe(struct platform_device *pdev)
+static int __devinit at91ether_probe(struct platform_device *pdev)
{
unsigned int phyid1, phyid2;
int detected = -1;

Uwe Kleine-König

unread,
Jul 11, 2009, 5:10:07 PM7/11/09
to
A pointer to omap24xxcam_probe is passed to the core via

platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.

An alternative to this patch is using platform_driver_probe instead of


platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.

Signed-off-by: Uwe Kleine-König <u.klein...@pengutronix.de>
Acked-by: Sakari Ailus <sakari...@maxwell.research.nokia.com>
Acked-by: Trilok Soni <soni....@gmail.com>
Cc: Hans Verkuil <hver...@xs4all.nl>
Cc: Mauro Carvalho Chehab <mch...@redhat.com>


Cc: Andrew Morton <ak...@linux-foundation.org>
---

drivers/media/video/omap24xxcam.c | 2 +-


1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/media/video/omap24xxcam.c b/drivers/media/video/omap24xxcam.c
index 5fc4ac0..3fc84b7 100644
--- a/drivers/media/video/omap24xxcam.c
+++ b/drivers/media/video/omap24xxcam.c
@@ -1737,7 +1737,7 @@ static struct v4l2_int_device omap24xxcam = {
*
*/

-static int __init omap24xxcam_probe(struct platform_device *pdev)
+static int __devinit omap24xxcam_probe(struct platform_device *pdev)
{
struct omap24xxcam_device *cam;
struct resource *mem;

Uwe Kleine-König

unread,
Jul 11, 2009, 5:10:07 PM7/11/09
to
A pointer to omap_i2c_probe is passed to the core via

platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.

An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.

Signed-off-by: Uwe Kleine-König <u.klein...@pengutronix.de>
Cc: Kalle Jokiniemi <ext-kalle...@nokia.com>
Cc: Tony Lindgren <to...@atomide.com>
Cc: Paul Walmsley <pa...@pwsan.com>
Cc: Richard Woodruff <r-woo...@ti.com>
Cc: chandra shekhar <x004...@ti.com>
Cc: Jason P Marini <jason....@gmail.com>
Cc: Syed Mohammed Khasim <x0kh...@ti.com>
Cc: Jarkko Nikula <jarkko...@nokia.com>
Cc: Juha Yrjola <juha....@solidboot.com>


Cc: Andrew Morton <ak...@linux-foundation.org>
---

drivers/i2c/busses/i2c-omap.c | 2 +-


1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index ad8d201..1ae5ae4 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -784,7 +784,7 @@ static const struct i2c_algorithm omap_i2c_algo = {
.functionality = omap_i2c_func,
};

-static int __init
+static int __devinit
omap_i2c_probe(struct platform_device *pdev)
{
struct omap_i2c_dev *dev;

Uwe Kleine-König

unread,
Jul 11, 2009, 5:10:14 PM7/11/09
to
A pointer to flctl_probe is passed to the core via

platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.

An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.

Signed-off-by: Uwe Kleine-König <u.klein...@pengutronix.de>
Acked-by: Yoshihiro Shimoda <shimoda....@renesas.com>
Cc: David Woodhouse <David.W...@intel.com>
Cc: Paul Mundt <let...@linux-sh.org>
Cc: Andrew Morton <ak...@linux-foundation.org>
---
drivers/mtd/nand/sh_flctl.c | 2 +-


1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/nand/sh_flctl.c b/drivers/mtd/nand/sh_flctl.c
index 2bc8966..1898423 100644
--- a/drivers/mtd/nand/sh_flctl.c
+++ b/drivers/mtd/nand/sh_flctl.c
@@ -769,7 +769,7 @@ static int flctl_chip_init_tail(struct mtd_info *mtd)
return 0;
}

-static int __init flctl_probe(struct platform_device *pdev)
+static int __devinit flctl_probe(struct platform_device *pdev)
{
struct resource *res;
struct sh_flctl *flctl;

Uwe Kleine-König

unread,
Jul 11, 2009, 5:10:13 PM7/11/09
to
A pointer to omap_mmc_probe is passed to the core via

platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.

An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.

Signed-off-by: Uwe Kleine-König <u.klein...@pengutronix.de>
Cc: Jean Pihet <jpi...@mvista.com>
Cc: Tony Lindgren <to...@atomide.com>
Cc: Pierre Ossman <drz...@drzeus.cx>
Cc: Andy Lowe <al...@mvista.com>
Cc: Adrian Hunter <ext-adri...@nokia.com>
Cc: Andrew Morton <ak...@linux-foundation.org>
Cc: David Brownell <dbro...@users.sourceforge.net>
Cc: Madhusudhan Chikkature<madh...@ti.com>
---
drivers/mmc/host/omap_hsmmc.c | 2 +-


1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index 1cf9cfb..dc9a430 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -967,7 +967,7 @@ static struct mmc_host_ops mmc_omap_ops = {
/* NYET -- enable_sdio_irq */
};

-static int __init omap_mmc_probe(struct platform_device *pdev)
+static int __devinit omap_mmc_probe(struct platform_device *pdev)
{
struct omap_mmc_platform_data *pdata = pdev->dev.platform_data;
struct mmc_host *mmc;

Uwe Kleine-König

unread,
Jul 11, 2009, 5:10:09 PM7/11/09
to
A pointer to jazz_sonic_probe is passed to the core via

platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.

As noticed by Geert Uytterhoeven sonic_probe1 is called by
jazz_sonic_probe, so the former has to move to .devinit.text, too.

An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.

Signed-off-by: Uwe Kleine-König <u.klein...@pengutronix.de>
Acked-by: Ralf Baechle <ra...@linux-mips.org>
Cc: Jeff Garzik <je...@garzik.org>


Cc: David S. Miller <da...@davemloft.net>

Cc: Thomas Bogendoerfer <tsbo...@alpha.franken.de>


Cc: Finn Thain <fth...@telegraphics.com.au>
Cc: Geert Uytterhoeven <ge...@linux-m68k.org>

Cc: Andrew Morton <ak...@linux-foundation.org>
---

drivers/net/jazzsonic.c | 4 ++--


1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/jazzsonic.c b/drivers/net/jazzsonic.c
index d12106b..8baf595 100644
--- a/drivers/net/jazzsonic.c
+++ b/drivers/net/jazzsonic.c
@@ -108,7 +108,7 @@ static const struct net_device_ops sonic_netdev_ops = {
.ndo_set_mac_address = eth_mac_addr,
};

-static int __init sonic_probe1(struct net_device *dev)
+static int __devinit sonic_probe1(struct net_device *dev)
{
static unsigned version_printed;
unsigned int silicon_revision;
@@ -211,7 +211,7 @@ out:
* Probe for a SONIC ethernet controller on a Mips Jazz board.
* Actually probing is superfluous but we're paranoid.
*/
-static int __init jazz_sonic_probe(struct platform_device *pdev)
+static int __devinit jazz_sonic_probe(struct platform_device *pdev)


{
struct net_device *dev;
struct sonic_local *lp;

Uwe Kleine-König

unread,
Jul 11, 2009, 5:10:13 PM7/11/09
to
A pointer to omap_hdq_probe is passed to the core via

platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.

An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.

Signed-off-by: Uwe Kleine-König <u.klein...@pengutronix.de>
Cc: Stanley.Miao <stanle...@windriver.com>
Acked-by: Evgeniy Polyakov <z...@ioremap.net>
Cc: Andrew Morton <ak...@linux-foundation.org>
Cc: Madhusudhan Chikkature <madh...@ti.com>
Cc: Felipe Balbi <felipe...@nokia.com>
---
drivers/w1/masters/omap_hdq.c | 4 ++--


1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/w1/masters/omap_hdq.c b/drivers/w1/masters/omap_hdq.c
index a7e3b70..ac09735 100644
--- a/drivers/w1/masters/omap_hdq.c
+++ b/drivers/w1/masters/omap_hdq.c
@@ -72,7 +72,7 @@ struct hdq_data {
int init_trans;
};

-static int __init omap_hdq_probe(struct platform_device *pdev);
+static int __devinit omap_hdq_probe(struct platform_device *pdev);
static int omap_hdq_remove(struct platform_device *pdev);

static struct platform_driver omap_hdq_driver = {
@@ -558,7 +558,7 @@ static void omap_w1_write_byte(void *_hdq, u8 byte)
return;
}

-static int __init omap_hdq_probe(struct platform_device *pdev)
+static int __devinit omap_hdq_probe(struct platform_device *pdev)
{
struct hdq_data *hdq_data;
struct resource *res;

Uwe Kleine-König

unread,
Jul 11, 2009, 5:10:11 PM7/11/09
to
A pointer to h1940bt_probe is passed to the core via

platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.

An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.

Signed-off-by: Uwe Kleine-König <u.klein...@pengutronix.de>
Cc: Russell King <rmk+k...@arm.linux.org.uk>
Cc: Arnaud Patard <arnaud...@rtp-net.org>
Cc: Ben Dooks <ben-...@fluff.org>


Cc: Andrew Morton <ak...@linux-foundation.org>
---

arch/arm/mach-s3c2410/h1940-bluetooth.c | 2 +-


1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-s3c2410/h1940-bluetooth.c b/arch/arm/mach-s3c2410/h1940-bluetooth.c
index 5aabf11..194c2eb 100644
--- a/arch/arm/mach-s3c2410/h1940-bluetooth.c
+++ b/arch/arm/mach-s3c2410/h1940-bluetooth.c
@@ -86,7 +86,7 @@ static DEVICE_ATTR(enable, 0644,
h1940bt_show,
h1940bt_store);

-static int __init h1940bt_probe(struct platform_device *pdev)
+static int __devinit h1940bt_probe(struct platform_device *pdev)
{
/* Configures BT serial port GPIOs */
s3c2410_gpio_cfgpin(S3C2410_GPH(0), S3C2410_GPH0_nCTS0);

Uwe Kleine-König

unread,
Jul 11, 2009, 5:10:13 PM7/11/09
to
A pointer to meth_probe is passed to the core via

platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.

An alternative to this patch is using platform_driver_probe instead of


platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.

Signed-off-by: Uwe Kleine-König <u.klein...@pengutronix.de>


Cc: David S. Miller <da...@davemloft.net>

Cc: Thomas Bogendoerfer <tsbo...@alpha.franken.de>
Cc: Christoph Lameter <c...@linux-foundation.org>
Cc: Jeff Garzik <jga...@redhat.com>
Acked-by: Ralf Baechle <ra...@linux-mips.org>


Cc: Andrew Morton <ak...@linux-foundation.org>
---

drivers/net/meth.c | 2 +-


1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/meth.c b/drivers/net/meth.c
index 5d04d94..0dddb02 100644
--- a/drivers/net/meth.c
+++ b/drivers/net/meth.c
@@ -784,7 +784,7 @@ static const struct net_device_ops meth_netdev_ops = {
/*
* The init function.
*/
-static int __init meth_probe(struct platform_device *pdev)
+static int __devinit meth_probe(struct platform_device *pdev)
{
struct net_device *dev;
struct meth_private *priv;

Uwe Kleine-König

unread,
Jul 11, 2009, 5:10:13 PM7/11/09
to
A pointer to sgivwfb_probe is passed to the core via

platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.

An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.

Signed-off-by: Uwe Kleine-König <u.klein...@pengutronix.de>
Cc: Antonino Daplas <ada...@gmail.com>
Cc: Andrew Morton <ak...@linux-foundation.org>
Cc: Adrian Bunk <bu...@stusta.de>
Cc: Christoph Hellwig <h...@lst.de>
---
drivers/video/sgivwfb.c | 2 +-


1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/video/sgivwfb.c b/drivers/video/sgivwfb.c
index bba5371..aff893e 100644
--- a/drivers/video/sgivwfb.c
+++ b/drivers/video/sgivwfb.c
@@ -745,7 +745,7 @@ int __init sgivwfb_setup(char *options)
/*
* Initialisation
*/
-static int __init sgivwfb_probe(struct platform_device *dev)
+static int __devinit sgivwfb_probe(struct platform_device *dev)
{
struct sgivw_par *par;
struct fb_info *info;

Uwe Kleine-König

unread,
Jul 11, 2009, 5:10:09 PM7/11/09
to
A pointer to sbmac_probe is passed to the core via
platform_driver_register and so the function must not disappear when the

.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an

oops as does a device being registered late.

An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.

Signed-off-by: Uwe Kleine-König <u.klein...@pengutronix.de>
Cc: Weiwei Wang <weiwe...@windriver.com>
Cc: Jeff Garzik <jga...@redhat.com>


Cc: David S. Miller <da...@davemloft.net>

Cc: Stephen Hemminger <shemm...@vyatta.com>


Cc: Maciej W. Rozycki <ma...@linux-mips.org>

Cc: Andrew Morton <ak...@linux-foundation.org>
---

drivers/net/sb1250-mac.c | 2 +-


1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/sb1250-mac.c b/drivers/net/sb1250-mac.c
index d8c9cf1..96b37b9 100644
--- a/drivers/net/sb1250-mac.c
+++ b/drivers/net/sb1250-mac.c
@@ -2688,7 +2688,7 @@ static int sbmac_poll(struct napi_struct *napi, int budget)
}


-static int __init sbmac_probe(struct platform_device *pldev)
+static int __devinit sbmac_probe(struct platform_device *pldev)
{
struct net_device *dev;
struct sbmac_softc *sc;

Uwe Kleine-König

unread,
Jul 11, 2009, 5:10:12 PM7/11/09
to
A pointer to hgafb_probe is passed to the core via

platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.

An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.

Signed-off-by: Uwe Kleine-König <u.klein...@pengutronix.de>
Cc: Krzysztof Helt <krzysz...@wp.pl>
Cc: Andrew Morton <ak...@linux-foundation.org>
Cc: Anton Vorontsov <avoro...@ru.mvista.com>
Cc: Antonino Daplas <ada...@pol.net>
---
drivers/video/hgafb.c | 2 +-


1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/video/hgafb.c b/drivers/video/hgafb.c
index 0129c04..db9b785 100644
--- a/drivers/video/hgafb.c
+++ b/drivers/video/hgafb.c
@@ -551,7 +551,7 @@ static struct fb_ops hgafb_ops = {
* Initialization
*/

-static int __init hgafb_probe(struct platform_device *pdev)
+static int __devinit hgafb_probe(struct platform_device *pdev)
{
struct fb_info *info;

Uwe Kleine-König

unread,
Jul 11, 2009, 5:10:15 PM7/11/09
to
A pointer to hp680bl_probe is passed to the core via

platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.

An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.

Signed-off-by: Uwe Kleine-König <u.klein...@pengutronix.de>
Cc: Akinobu Mita <akinob...@gmail.com>
Cc: Richard Purdie <rpu...@linux.intel.com>
Cc: Paul Mundt <let...@linux-sh.org>
Acked-by: Kristoffer Ericson <Kristoffe...@gmail.com>
Cc: Andrew Morton <ak...@linux-foundation.org>
Cc: Andriy Skulysh <asku...@gmail.com>


Cc: Antonino Daplas <ada...@pol.net>
---

drivers/video/backlight/hp680_bl.c | 2 +-


1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/video/backlight/hp680_bl.c b/drivers/video/backlight/hp680_bl.c
index 5be55a2..7fb4eef 100644
--- a/drivers/video/backlight/hp680_bl.c
+++ b/drivers/video/backlight/hp680_bl.c
@@ -103,7 +103,7 @@ static struct backlight_ops hp680bl_ops = {
.update_status = hp680bl_set_intensity,
};

-static int __init hp680bl_probe(struct platform_device *pdev)
+static int __devinit hp680bl_probe(struct platform_device *pdev)
{
struct backlight_device *bd;

David Brownell

unread,
Jul 11, 2009, 6:30:14 PM7/11/09
to
On Saturday 11 July 2009, Uwe Kleine-K�nig wrote:
> An alternative to this patch is using platform_driver_probe instead of
> platform_driver_register plus removing the pointer to the probe function
> from the struct platform_driver.

And that's the preferred fix I was expecting to see.

NAK on this version.

David Brownell

unread,
Jul 11, 2009, 6:30:13 PM7/11/09
to
On Saturday 11 July 2009, Uwe Kleine-K�nig wrote:
> An alternative to this patch is using platform_driver_probe instead of
> platform_driver_register plus removing the pointer to the probe function
> from the struct platform_driver.

And that's the preferred fix ... NAK on this one.

In fact its quite rare for any SoC device to be hotpluggable,
so your default stance in such cases should be to switch over
to platform_driver_probe() instead of doing like this.

Ian molton

unread,
Jul 11, 2009, 6:30:17 PM7/11/09
to

Acked-by: Ian Molton <i...@mnementh.co.uk>

Uwe Kleine-König wrote:
> A pointer to w100fb_probe is passed to the core via


> platform_driver_register and so the function must not disappear when the
> .init sections are discarded. Otherwise (if also having HOTPLUG=y)
> unbinding and binding a device to the driver via sysfs will result in an
> oops as does a device being registered late.
>
> An alternative to this patch is using platform_driver_probe instead of
> platform_driver_register plus removing the pointer to the probe function
> from the struct platform_driver.
>
> Signed-off-by: Uwe Kleine-König <u.klein...@pengutronix.de>

> Cc: Philipp Zabel <philip...@gmail.com>
> Cc: Ian Molton <sp...@f2s.com>
> Cc: Richard Purdie <rpu...@rpsys.net>
> Cc: Antonino Daplas <ada...@gmail.com>
> Cc: Alberto Mardegan <ma...@users.sourceforge.net>


> Cc: Andrew Morton <ak...@linux-foundation.org>
> ---

> drivers/video/w100fb.c | 2 +-


> 1 files changed, 1 insertions(+), 1 deletions(-)
>

> diff --git a/drivers/video/w100fb.c b/drivers/video/w100fb.c
> index 2376f68..5d22395 100644
> --- a/drivers/video/w100fb.c
> +++ b/drivers/video/w100fb.c
> @@ -628,7 +628,7 @@ static int w100fb_resume(struct platform_device *dev)
> #endif
>
>
> -int __init w100fb_probe(struct platform_device *pdev)
> +int __devinit w100fb_probe(struct platform_device *pdev)
> {
> int err = -EIO;
> struct w100fb_mach_info *inf;

David Brownell

unread,
Jul 11, 2009, 6:40:10 PM7/11/09
to
On Saturday 11 July 2009, Uwe Kleine-K�nig wrote:
> An alternative to this patch is using platform_driver_probe instead of
> platform_driver_register plus removing the pointer to the probe function
> from the struct platform_driver.

Repeat -- NAK on this. Use platform_driver_probe() instead.

I really don't like this series of patches. It's just adding
bloat to kernels, in chunks of up to a page per patch.

Maciej W. Rozycki

unread,
Jul 11, 2009, 8:40:08 PM7/11/09
to
On Sat, 11 Jul 2009, Uwe Kleine-K?nig wrote:

> A pointer to sbmac_probe is passed to the core via
> platform_driver_register and so the function must not disappear when the
> .init sections are discarded. Otherwise (if also having HOTPLUG=y)
> unbinding and binding a device to the driver via sysfs will result in an
> oops as does a device being registered late.
>
> An alternative to this patch is using platform_driver_probe instead of
> platform_driver_register plus removing the pointer to the probe function
> from the struct platform_driver.
>

> Signed-off-by: Uwe Kleine-K?nig <u.klein...@pengutronix.de>


> Cc: Weiwei Wang <weiwe...@windriver.com>
> Cc: Jeff Garzik <jga...@redhat.com>
> Cc: David S. Miller <da...@davemloft.net>
> Cc: Stephen Hemminger <shemm...@vyatta.com>
> Cc: Maciej W. Rozycki <ma...@linux-mips.org>
> Cc: Andrew Morton <ak...@linux-foundation.org>
> ---
> drivers/net/sb1250-mac.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)

Acked-by: Maciej W. Rozycki <ma...@linux-mips.org>

Fine by me, thanks.

Maciej

Uwe Kleine-König

unread,
Jul 12, 2009, 4:40:08 AM7/12/09
to
Hello David,

On Sat, Jul 11, 2009 at 03:30:44PM -0700, David Brownell wrote:
> On Saturday 11 July 2009, Uwe Kleine-K�nig wrote:
> > An alternative to this patch is using platform_driver_probe instead of
> > platform_driver_register plus removing the pointer to the probe function
> > from the struct platform_driver.
>
> Repeat -- NAK on this. Use platform_driver_probe() instead.
>
> I really don't like this series of patches. It's just adding
> bloat to kernels, in chunks of up to a page per patch.

I'm aware that in some cases platform_driver_probe is better. But as I
don't have access to most of the affected platforms I consider it saver.
That's why I choosed this way. The problem with platform_driver_probe
is that if a device is added only after the driver is probed the
device isn't bound.

So if you say you can test it, it's totally OK for me to go the other
way.

Best regards
Uwe

--
Pengutronix e.K. | Uwe Kleine-K�nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |

Russell King

unread,
Jul 12, 2009, 4:50:16 AM7/12/09
to
On Sun, Jul 12, 2009 at 10:35:10AM +0200, Uwe Kleine-K�nig wrote:
> Hello David,
>
> On Sat, Jul 11, 2009 at 03:30:44PM -0700, David Brownell wrote:
> > On Saturday 11 July 2009, Uwe Kleine-K�nig wrote:
> > > An alternative to this patch is using platform_driver_probe instead of
> > > platform_driver_register plus removing the pointer to the probe function
> > > from the struct platform_driver.
> >
> > Repeat -- NAK on this. Use platform_driver_probe() instead.
> >
> > I really don't like this series of patches. It's just adding
> > bloat to kernels, in chunks of up to a page per patch.
> I'm aware that in some cases platform_driver_probe is better. But as I
> don't have access to most of the affected platforms I consider it saver.
> That's why I choosed this way. The problem with platform_driver_probe
> is that if a device is added only after the driver is probed the
> device isn't bound.

Your approach is perfectly fine, and safe. You're not adding any
additional bloat which isn't already there. If it were adding any
bloat (which it isn't), it certainly is not "in chunks of up to a
page per patch".

Overall, this patch is an improvement, so all these get my ack, and
they should be applied as is.

Using platform_driver_probe() does allow you to reduce the kernel
footprint still further, but that requires knowledge of the platforms
affected (knowing that the platform devices are present before the
drivers get probed.)

I'll apply the ones for drivers I look after later today.

--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of:

David Brownell

unread,
Jul 12, 2009, 5:40:08 AM7/12/09
to
On Sunday 12 July 2009, Russell King wrote:
> Your approach is perfectly fine, and safe. �You're not adding any
> additional bloat which isn't already there.

He is most certainly increasing the runtime footprint needessly.
Runtime footprint which previously was *NOT* present.

That's known as "bloat".

And also known as "adding".


> If it were adding any
> bloat (which it isn't), it certainly is not "in chunks of up to a
> page per patch".

Oddly, the init section of the $SUBJECT driver is about 3600 bytes.
That's what ... almost a (4K) page, wouldn't you say?

It's got a lot of one-time hardware init that was explicitly pushed
into the init section so it would stay out of the runtime image.


> Overall, this patch is an improvement, so all these get my ack, and
> they should be applied as is.

The $SUBJECT patch is most certainly NOT an improvement.

It still has a solid NAK, since it's adding almost a page of bloat.


> Using platform_driver_probe() does allow you to reduce the kernel
> footprint still further, but that requires knowledge of the platforms
> affected (knowing that the platform devices are present before the
> drivers get probed.)

And as I've pointed out before ... that's exactly how platform
drivers work on most platforms. Very specifically, I've pointed
out previously to Uwe, it's how the OMAP code works.

So it's kind of perplexing to still see patches sent along which
make the situation worse.

David Brownell

unread,
Jul 12, 2009, 5:40:09 AM7/12/09
to
On Sunday 12 July 2009, Uwe Kleine-K�nig wrote:
>
> > Repeat -- NAK on this. �Use platform_driver_probe() instead.
> >
> > I really don't like this series of patches. �It's just adding
> > bloat to kernels, in chunks of up to a page per patch.
>
> I'm aware that in some cases platform_driver_probe is better.

Make that "most cases". It's rare that platform devices get
hotplugged. Mostly they're set up at system init ... often
it's all done by the time arch_initcall() finishes.


> But as I
> don't have access to most of the affected platforms I consider it saver.
> That's why I choosed this way.

You do have access to the source tree, and a powerful little
tool called "grep -r" ... which can easily tell you where the
devices for those platforms are defined. And thus let you see
if a given one happens to be one of the exceptional cases where
platform_driver_probe() won't work.


> The problem with platform_driver_probe
> is that if a device is added only after the driver is probed the
> device isn't bound.

That's rarely a problem though; it certainly isn't in the case of
the $SUBJECT driver, and others on that platform. I've pointed
that out to you before.

Russell King

unread,
Jul 12, 2009, 9:20:08 AM7/12/09
to
On Sun, Jul 12, 2009 at 09:47:34AM +0100, Russell King wrote:
> Your approach is perfectly fine, and safe. You're not adding any
> additional bloat which isn't already there. If it were adding any
> bloat (which it isn't), it certainly is not "in chunks of up to a
> page per patch".

Here is the effect of applying the am79c961 patch:

text data bss dec hex filename
2553829 76608 78560 2708997 295605 vmlinux.patched
2553285 76608 78560 2708453 2953e5 vmlinux

that's an extra 500 bytes, but wait a moment before criticising that.
Let's look at where these came from:

before:
1 .text.head 00000240 c0008000 c0008000 00010000 2**5
CONTENTS, ALLOC, LOAD, READONLY, CODE
2 .init 00016dc0 c0008240 c0008240 00010240 2**5
CONTENTS, ALLOC, LOAD, CODE
3 .text 002455a4 c001f000 c001f000 00027000 2**5
CONTENTS, ALLOC, LOAD, READONLY, CODE
4 __ksymtab 00004198 c0265000 c0265000 0026d000 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA

after:
1 .text.head 00000240 c0008000 c0008000 00010000 2**5
CONTENTS, ALLOC, LOAD, READONLY, CODE
2 .init 00016dc0 c0008240 c0008240 00010240 2**5
CONTENTS, ALLOC, LOAD, CODE
3 .text 002457c4 c001f000 c001f000 00027000 2**5
CONTENTS, ALLOC, LOAD, READONLY, CODE
4 __ksymtab 00004198 c0265000 c0265000 0026d000 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA

Notice that the VMA of __ksymtab hasn't changed, which follows on from
the text section. What's happened is that we've merely moved some text
from the .init section to the .text section, and in this case we haven't
changed the overall file size, nor the number of pages used for each
section.

To nack these patches based upon every patch adding one page to the kernel
size is clearly overstating the effect. The effect is that in some
configurations, it moves some text out of .init into .text, and can
increase the size of the kernel kept in memory after boot time. It's
certainly no where near "one page per patch" though, and the overall
size of the kernel may only change +/- one page through doing this -
eg, you might move enough text out of .init so that shrinks by one
page without making .text expand by a page.

I don't think this is a strong enough reason to reject any of these
patches. David's approach is an enhancement whereas your patches
are a bug fix.

David Brownell

unread,
Jul 12, 2009, 4:10:17 PM7/12/09
to
On Sunday 12 July 2009, Russell King wrote:
> Here is the effect of applying the am79c961 patch:

Observe: $SUBJECT is an entirely separate patch.

My NAKs were quite specific.

Uwe Kleine-König

unread,
Jul 12, 2009, 4:50:09 PM7/12/09
to
On Sat, Jul 11, 2009 at 03:30:44PM -0700, David Brownell wrote:
> On Saturday 11 July 2009, Uwe Kleine-K�nig wrote:
> > An alternative to this patch is using platform_driver_probe instead of
> > platform_driver_register plus removing the pointer to the probe function
> > from the struct platform_driver.
>
> Repeat -- NAK on this. Use platform_driver_probe() instead.
Oh, I just noticed that this patch is a relict. The driver was changed
to use platform_driver_probe in
864e28b4f24106b799e991fa136fa6fa2b638a68.

As my old patch just applied anyhow I didn't notice that.

And I just found another similar problem.
E.g. clevo_mail_led_probe is defined to live in .init.text and uses
platform_driver_probe, but as it's referenced in the driver struct my
script matched this file.

(Is it wrong (wrong as in "worth to be fixed") to reference the probe
function in the driver struct when platform_driver_probe is used? If so
at least

drivers/serial/msm_serial.c
drivers/i2c/busses/i2c-imx.c

are effected, too. Patches at

http://news.gmane.org/find-root.php?group=gmane.linux.ports.arm.kernel&article=62319

)

The other patches are not affected.

@Greg: Please just drop these two patches:

[PATCH] move omap_udc's probe function to .devinit.text
[PATCH] move leds-clevo-mail's probe function to .devinit.text

Sorry for the unconvenience.

Best regards
Uwe

--
Pengutronix e.K. | Uwe Kleine-K�nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |

David Brownell

unread,
Jul 12, 2009, 6:20:15 PM7/12/09
to
On Sunday 12 July 2009, Uwe Kleine-K�nig wrote:
> On Sat, Jul 11, 2009 at 03:30:44PM -0700, David Brownell wrote:
> > Repeat -- NAK on this. Use platform_driver_probe() instead.
>
> Oh, I just noticed that this patch is a relict. The driver was changed
> to use platform_driver_probe in
> 864e28b4f24106b799e991fa136fa6fa2b638a68.

Good.

> And I just found another similar problem.
> E.g. clevo_mail_led_probe is defined to live in .init.text and uses
> platform_driver_probe, but as it's referenced in the driver struct my
> script matched this file.
>
> (Is it wrong (wrong as in "worth to be fixed") to reference the probe
> function in the driver struct when platform_driver_probe is used?

Wrong, but not dangerous ... so fix, but at low priority.
At least, low until the DEBUG_SECTION_MISMATCH stuff gets
re-enabled.

When platform_driver_probe() returns, that driver field willl
have changed to something safe.


> If so
> at least
>
> drivers/serial/msm_serial.c
> drivers/i2c/busses/i2c-imx.c
>
> are effected, too. Patches at
>
> http://news.gmane.org/find-root.php?group=gmane.linux.ports.arm.kernel&article=62319
>
> )
>
> The other patches are not affected.
>
> @Greg: Please just drop these two patches:
>
> [PATCH] move omap_udc's probe function to .devinit.text
> [PATCH] move leds-clevo-mail's probe function to .devinit.text

... and the others I NAKed too.

David Brownell

unread,
Jul 12, 2009, 6:30:10 PM7/12/09
to
On Sunday 12 July 2009, Russell King wrote:
> �David's approach is an enhancement whereas your patches
> are a bug fix.

Not an enhancement. Uwe's current approach causes regressions
in terms of kernel runtime footprint. That is, pages will newly
be made to sit around doing *nothing* forever, when they could
have been used to get Real Work done. And, pre-patches, they
would have been getting Real Work done.

If it weren't a regression I wouldn't have objected.

A few years back, I measured the impact of having probe() and
friends in a section -- init{,data} vs devinit{,data} -- that gets
removed. Most drivers were in the 1K-2K range. $SUBJECT was
larger than most, but there were some with even more discardable
init logic.

All that adds up. There's no point to commiting patches that
do things wrong *and* waste space, then need to fix things up
again later when it's easy to do it right in the first place.

Eric Miao

unread,
Jul 13, 2009, 4:50:16 AM7/13/09
to
Uwe Kleine-König wrote:
> A pointer to corgi_ssp_probe is passed to the core via

> platform_driver_register and so the function must not disappear when the
> .init sections are discarded. Otherwise (when having HOTPLUG=y)

> unbinding and binding a device to the driver via sysfs will result in an
> oops as does a device being registered late.
>
> An alternative to this patch is using platform_driver_probe instead of
> platform_driver_register plus removing the pointer to the probe function
> from the struct platform_driver.
>

This corgi_ssp.c and corgi_lcd.c will be obsoleted soon, the only user
corgi_ts.c has been marked as deprecated, and will be remove once the
ssp cleanup work is done, so further fixes to these files are pointless.

Uwe Kleine-König

unread,
Jul 13, 2009, 5:10:24 AM7/13/09
to
On Mon, Jul 13, 2009 at 04:44:01PM +0800, Eric Miao wrote:
> Uwe Kleine-K�nig wrote:
> > A pointer to corgi_ssp_probe is passed to the core via
> > platform_driver_register and so the function must not disappear when the
> > .init sections are discarded. Otherwise (when having HOTPLUG=y)
> > unbinding and binding a device to the driver via sysfs will result in an
> > oops as does a device being registered late.
> >
> > An alternative to this patch is using platform_driver_probe instead of
> > platform_driver_register plus removing the pointer to the probe function
> > from the struct platform_driver.
> >
>
> This corgi_ssp.c and corgi_lcd.c will be obsoleted soon, the only user
> corgi_ts.c has been marked as deprecated, and will be remove once the
> ssp cleanup work is done, so further fixes to these files are pointless.
OK, dropped. I hope that either the drivers will be gone when I respin
this series or I still remember having dropped the patches :-)

Best regards
Uwe

--
Pengutronix e.K. | Uwe Kleine-K�nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |

Uwe Kleine-König

unread,
Jul 13, 2009, 5:20:09 AM7/13/09
to
clevo_mail_led_driver is registered using platform_driver_probe which
takes care for the probe function itself. So don't pass it in the
driver struct, too.

Signed-off-by: Uwe Kleine-König <u.klein...@pengutronix.de>
Cc: Márton Németh <nm...@freemail.hu>
Cc: Richard Purdie <rpu...@rpsys.net>
---
Hello,

I'm a bit uncertain if this patch is really useful. There is no
difference in runtime behaviour because platform_driver_probe just
overwrites the .probe member. Nevertheless it's a section violation
that hurts my eye and triggers a false positive for my script that finds
drivers using probe functions in .init.text and
platform_driver_register.

Care? Don't care?

Best regards
Uwe

drivers/leds/leds-clevo-mail.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/drivers/leds/leds-clevo-mail.c b/drivers/leds/leds-clevo-mail.c
index 1813c84..5b36ae2 100644
--- a/drivers/leds/leds-clevo-mail.c
+++ b/drivers/leds/leds-clevo-mail.c
@@ -157,7 +157,6 @@ static int clevo_mail_led_remove(struct platform_device *pdev)
}

static struct platform_driver clevo_mail_led_driver = {
- .probe = clevo_mail_led_probe,
.remove = clevo_mail_led_remove,
.driver = {
.name = KBUILD_MODNAME,
--
tg: (7638d53..) t/noprobecbforplatformdriverprobe/clevo_mail_led_driver (depends on: linus/master)

Uwe Kleine-König

unread,
Jul 13, 2009, 5:20:10 AM7/13/09
to
Hello David,

On Sun, Jul 12, 2009 at 03:21:30PM -0700, David Brownell wrote:
> On Sunday 12 July 2009, Russell King wrote:
> > �David's approach is an enhancement whereas your patches
> > are a bug fix.
>
> Not an enhancement. Uwe's current approach causes regressions
> in terms of kernel runtime footprint. That is, pages will newly
> be made to sit around doing *nothing* forever, when they could
> have been used to get Real Work done. And, pre-patches, they
> would have been getting Real Work done.
>
> If it weren't a regression I wouldn't have objected.

IMHO my patches primarily fix possible oopses. I see your point that
platform_driver_probe has some advantages, but I consider it too
time-consuming to check for each of the initially 60+ patches when the
respecting devices are registered.

My intention is to point out a problem plus provide a safe fix.

> All that adds up. There's no point to commiting patches that
> do things wrong *and* waste space, then need to fix things up
> again later when it's easy to do it right in the first place.

Obviously it's arguable if it's wrong or not. I consider it at least
better than doing nothing.

Best regards
Uwe

--
Pengutronix e.K. | Uwe Kleine-K�nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |

Peter Jones

unread,
Jul 13, 2009, 10:00:26 AM7/13/09
to
On 07/11/2009 04:52 PM, Uwe Kleine-König wrote:
> A pointer to efifb_probe is passed to the core via

> platform_driver_register and so the function must not disappear when the
> .init sections are discarded. Otherwise (if also having HOTPLUG=y)

> unbinding and binding a device to the driver via sysfs will result in an
> oops as does a device being registered late.

Looks good to me:

Acked-by: Peter Jones <pjo...@redhat.com>

>
> An alternative to this patch is using platform_driver_probe instead of
> platform_driver_register plus removing the pointer to the probe function
> from the struct platform_driver.
>

> Signed-off-by: Uwe Kleine-König <u.klein...@pengutronix.de>
> Cc: Peter Jones <pjo...@redhat.com>
> Cc: Krzysztof Helt <krzysz...@poczta.fm>
> Cc: Geert Uytterhoeven <Geert.Uyt...@sonycom.com>
> Cc: Jaya Kumar <jayakum...@gmail.com>
> Cc: Ralf Baechle <ra...@linux-mips.org>


> Cc: Maciej W. Rozycki <ma...@linux-mips.org>
> Cc: Andrew Morton <ak...@linux-foundation.org>

> Cc: Chandramouli Narayanan <mo...@linux.intel.com>
> Cc: Huang Ying <ying....@intel.com>
> ---
> drivers/video/efifb.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/video/efifb.c b/drivers/video/efifb.c
> index eb12182..2161f21 100644
> --- a/drivers/video/efifb.c
> +++ b/drivers/video/efifb.c
> @@ -201,7 +201,7 @@ static int __init efifb_setup(char *options)
> return 0;
> }
>
> -static int __init efifb_probe(struct platform_device *dev)
> +static int __devinit efifb_probe(struct platform_device *dev)
> {
> struct fb_info *info;
> int err;


--
Peter

In computer science, about the only thing we can prove is that traveling
salesmen can't find their way from one place to another effeciently, and
that unix hackers can't really decode 40-bit keys by harnessing all the
computers in the lab. And the hackers do it anyway, and the salesmen still
make their rounds.
-- Ron Jeffries, WikiWikiWeb

Nicolas Pitre

unread,
Jul 13, 2009, 4:00:19 PM7/13/09
to
On Sat, 11 Jul 2009, Uwe Kleine-König wrote:

> A pointer to orion_nand_probe is passed to the core via


> platform_driver_register and so the function must not disappear when the
> .init sections are discarded. Otherwise (if also having HOTPLUG=y)
> unbinding and binding a device to the driver via sysfs will result in an
> oops as does a device being registered late.
>
> An alternative to this patch is using platform_driver_probe instead of
> platform_driver_register plus removing the pointer to the probe function
> from the struct platform_driver.

For those kind of platform devices I'd prefer the alternative.


Nicolas

David Brownell

unread,
Jul 13, 2009, 5:40:07 PM7/13/09
to
On Monday 13 July 2009, Uwe Kleine-K�nig wrote:
> > If it weren't a regression I wouldn't have objected.
>
> IMHO my patches primarily fix possible oopses. �I see your point that
> platform_driver_probe has some advantages,

The point is that your specific change caused a type
of regresssion ... I said nothing about "advantages",
just that your approach creates footprint regressions.


> but I consider it too
> time-consuming to check for each of the initially 60+ patches when the
> respecting devices are registered.

As a rule, preventing regressions is part of the task
description for any patch series.

Now, accidents do happen. But you had *ALREADY* gotten
NAKs for many of these patches, specifically on the
basis that they were causing these regressions. You
saved zero time by re-submitting known-broken patches.

Uwe Kleine-König

unread,
Jul 14, 2009, 4:20:12 AM7/14/09
to
Hi Nicolas,

On Mon, Jul 13, 2009 at 03:37:23PM -0400, Nicolas Pitre wrote:

Can I interpret that as your intend to implement and test it?

Best regards
Uwe

--
Pengutronix e.K. | Uwe Kleine-K�nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |

Nicolas Pitre

unread,
Jul 14, 2009, 12:30:21 PM7/14/09
to
On Tue, 14 Jul 2009, Uwe Kleine-K�nig wrote:

> Hi Nicolas,
>
> On Mon, Jul 13, 2009 at 03:37:23PM -0400, Nicolas Pitre wrote:
> > On Sat, 11 Jul 2009, Uwe Kleine-K�nig wrote:
> >
> > > A pointer to orion_nand_probe is passed to the core via
> > > platform_driver_register and so the function must not disappear when the
> > > .init sections are discarded. Otherwise (if also having HOTPLUG=y)
> > > unbinding and binding a device to the driver via sysfs will result in an
> > > oops as does a device being registered late.
> > >
> > > An alternative to this patch is using platform_driver_probe instead of
> > > platform_driver_register plus removing the pointer to the probe function
> > > from the struct platform_driver.
> >
> > For those kind of platform devices I'd prefer the alternative.
> Can I interpret that as your intend to implement and test it?

"Eventually", yes. This is however a low priority for me.


Nicolas

Uwe Kleine-König

unread,
Jul 14, 2009, 1:20:15 PM7/14/09
to
Hi Nicolas,

On Tue, Jul 14, 2009 at 12:12:46PM -0400, Nicolas Pitre wrote:
> > > > An alternative to this patch is using platform_driver_probe instead of
> > > > platform_driver_register plus removing the pointer to the probe function
> > > > from the struct platform_driver.
> > >
> > > For those kind of platform devices I'd prefer the alternative.
> > Can I interpret that as your intend to implement and test it?
>
> "Eventually", yes. This is however a low priority for me.

For me, too. I just keep the patch in my queue that it doesn't get
dropped.

Greg KH

unread,
Jul 16, 2009, 7:20:10 PM7/16/09
to
On Sat, Jul 11, 2009 at 10:46:31PM +0200, Uwe Kleine-K�nig wrote:
> Hello Greg,
>
> On Sat, Jul 11, 2009 at 11:59:20AM -0700, Greg KH wrote:
> > On Sat, Jul 11, 2009 at 12:00:14PM +0200, Uwe Kleine-K�nig wrote:
> > > Hi Greg,
> > >
> > > > > Are you conviced and took the patch or did you give up to convince me?
> > > >
> > > > Heh, no, sorry, it got burried in my queue.
> > > >
> > > > > I still think the patch is correct and I'd like to have it applied.
> > > >
> > > > Ok, let's test it out in the linux-next tree for a while to make sure it
> > > > works properly. Care to send me an updated version?
> > > I updated to latest Linus' master. It applies to linux-next from
> > > Fri Jul 10 14:44:30 2009 +1000 as is.
> > >
> > > Back some time I sent a series that fixes many of these bugs. I will
> > > update it later today and resend.
> > >
> > > Best regards and thanks,
> > > Uwe
> > >
> > > ---->8----
> > > From: Uwe Kleine-K�nig <u.klein...@pengutronix.de>
> > > Subject: [PATCH] platform_driver_register: warn if probe is in .init.text
> > >
> > > with HOTPLUG=y it's wrong to register a platform_driver whose probe
> > > function lives in .init.text because the probe function can be called
> > > (e.g. via sysfs or by registering a device late) after the init sections
> > > are already discarded. This results in an oops.
> > >
> > > So warn if such a driver is registered.
> > >
> > > Without HOTPLUG the probe function can (and should) be discarded if the
> > > driver is registered while the init sections are still available.
> > > In this case warn if the probe function isn't discarded later. (As
> > > described in the comments there is a small chance for a wrong warning.
> > > But as HOTPLUG=n is unusual today and the situation is strage enough to
> > > be cleaned up anyhow, I think this is OK.)
> > >
> > > Signed-off-by: Uwe Kleine-K�nig <u.klein...@pengutronix.de>
> >
> > This code kills the build in very bad ways :(
> it's just a ; that didn't made it into the new version. Don't know why.
>
> If you squash the patch below into the patch I sent it should work
> again.

I don't have the original anymore :(

As it seemed that a lot of people who controlled the problem drivers
didn't like the patches, what are you considering doing now?

thanks,

greg k-h

Uwe Kleine-König

unread,
Jul 17, 2009, 4:40:08 AM7/17/09
to
Hello Greg,

> > > This code kills the build in very bad ways :(
> > it's just a ; that didn't made it into the new version. Don't know why.
> >
> > If you squash the patch below into the patch I sent it should work
> > again.
>
> I don't have the original anymore :(

See below. I changed the wording of the output in the !HOTPLUG case to
say .devinit.text instead of .init.text and fixed a typo in the commit
log. Other than that the patch is unchanged.



> As it seemed that a lot of people who controlled the problem drivers
> didn't like the patches, what are you considering doing now?

Hmm, there are only two people that expressed not being completly happy
with my suggestions.

I think I will just drop the a patches for now and later just point out
the problem. (At least for David's nacked drivers I feel little urge to
implement the alternative fix.)

And maybe if the "warn if probe is in .init.text" patch is merged the
people seeing the problem become more numerous which I hope will either
increase the positive feedback for the other patches or someone else
will propose a patch implementing the alternative. (Maybe I should just
BUG() instead of only printing a warning :-)

Best regards and thanks for your ping on the subject
Uwe

--->8---


From: Uwe Kleine-K�nig <u.klein...@pengutronix.de>

Subject: platform_driver_register: warn if probe is in .init.text

with HOTPLUG=y it's wrong to register a platform_driver who's probe


function lives in .init.text because the probe function can be called
(e.g. via sysfs or by registering a device late) after the init sections
are already discarded. This results in an oops.

So warn if such a driver is registered.

Without HOTPLUG the probe function can (and should) be discarded if the
driver is registered while the init sections are still available.
In this case warn if the probe function isn't discarded later. (As
described in the comments there is a small chance for a wrong warning.
But as HOTPLUG=n is unusual today and the situation is strage enough to
be cleaned up anyhow, I think this is OK.)

Signed-off-by: Uwe Kleine-K�nig <u.klein...@pengutronix.de>

---
drivers/base/platform.c | 43 +++++++++++++++++++++++++++++++++++++------
include/linux/kernel.h | 2 ++
include/linux/module.h | 12 ++++++++++++
kernel/extable.c | 12 ++++++++++++
kernel/module.c | 36 ++++++++++++++++++++++++++++++++++++
5 files changed, 99 insertions(+), 6 deletions(-)

diff --git a/drivers/base/platform.c b/drivers/base/platform.c
index 81cb01b..68ef8cc 100644
--- a/drivers/base/platform.c
+++ b/drivers/base/platform.c
@@ -470,11 +470,7 @@ static void platform_drv_shutdown(struct device *_dev)
drv->shutdown(dev);
}

-/**
- * platform_driver_register
- * @drv: platform driver structure
- */
-int platform_driver_register(struct platform_driver *drv)
+static int __platform_driver_register(struct platform_driver *drv)
{
drv->driver.bus = &platform_bus_type;
if (drv->probe)
@@ -489,6 +485,41 @@ int platform_driver_register(struct platform_driver *drv)

return driver_register(&drv->driver);
}
+
+/**
+ * platform_driver_register
+ * @drv: platform driver structure
+ */
+int platform_driver_register(struct platform_driver *drv)
+{
+ int ret = __platform_driver_register(drv);
+
+#if defined(CONFIG_HOTPLUG)
+ /*
+ * drivers that are registered by platform_driver_register
+ * should not have their probe function in .init.text. The
+ * reason is that a probe can happen after .init.text is
+ * discarded which then results in an oops. The alternatives
+ * are using .devinit.text for the probe function or "register"
+ * with platform_driver_probe.
+ */
+ if (drv->probe && kernel_init_text_address((unsigned long)drv->probe))
+ pr_warning("oops-warning: probe function of platform driver %s"
+ " lives in .init.text\n", drv->driver.name);
+#else
+ /*
+ * without HOTPLUG probe functions can be discarded after the driver is
+ * loaded.
+ * There is a little chance for false positives, namely if the driver is
+ * registered after the .init sections are discarded.
+ */
+ if (drv->probe && !kernel_init_text_address((unsigned long)drv->probe))
+ pr_info("probably the probe function of platform driver %s can"
+ " be moved to .devinit.text\n",
+ drv->driver.name);
+#endif
+ return ret;
+}
EXPORT_SYMBOL_GPL(platform_driver_register);

/**
@@ -525,7 +556,7 @@ int __init_or_module platform_driver_probe(struct platform_driver *drv,

/* temporary section violation during probe() */
drv->probe = probe;
- retval = code = platform_driver_register(drv);
+ retval = code = __platform_driver_register(drv);

/* Fixup that section violation, being paranoid about code scanning
* the list of drivers in order to probe new devices. Check to see
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index d6320a3..2d48087 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -203,8 +203,10 @@ extern char *get_options(const char *str, int nints, int *ints);
extern unsigned long long memparse(const char *ptr, char **retptr);

extern int core_kernel_text(unsigned long addr);
+extern int core_kernel_init_text(unsigned long addr);
extern int __kernel_text_address(unsigned long addr);
extern int kernel_text_address(unsigned long addr);
+extern int kernel_init_text_address(unsigned long addr);
extern int func_ptr_is_kernel_text(void *ptr);

struct pid;
diff --git a/include/linux/module.h b/include/linux/module.h
index 098bdb7..93f47c4 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -385,9 +385,11 @@ static inline int module_is_live(struct module *mod)
}

struct module *__module_text_address(unsigned long addr);
+struct module *__module_init_text_address(unsigned long addr);
struct module *__module_address(unsigned long addr);
bool is_module_address(unsigned long addr);
bool is_module_text_address(unsigned long addr);
+bool is_module_init_text_address(unsigned long addr);

static inline int within_module_core(unsigned long addr, struct module *mod)
{
@@ -556,6 +558,11 @@ static inline struct module *__module_text_address(unsigned long addr)
return NULL;
}

+static inline struct module *__module_init_text_address(unsigned long addr)
+{
+ return NULL;
+}
+
static inline bool is_module_address(unsigned long addr)
{
return false;
@@ -566,6 +573,11 @@ static inline bool is_module_text_address(unsigned long addr)
return false;
}

+static inline bool is_module_init_text_address(unsigned long addr)
+{
+ return false;
+}
+
/* Get/put a kernel symbol (calls should be symmetric) */
#define symbol_get(x) ({ extern typeof(x) x __attribute__((weak)); &(x); })
#define symbol_put(x) do { } while(0)
diff --git a/kernel/extable.c b/kernel/extable.c
index 7f8f263..bfd7bda 100644
--- a/kernel/extable.c
+++ b/kernel/extable.c
@@ -66,6 +66,11 @@ int core_kernel_text(unsigned long addr)
addr <= (unsigned long)_etext)
return 1;

+ return core_kernel_init_text;
+}
+
+int core_kernel_init_text(unsigned long addr)
+{
if (system_state == SYSTEM_BOOTING &&
init_kernel_text(addr))
return 1;
@@ -98,6 +103,13 @@ int kernel_text_address(unsigned long addr)
return is_module_text_address(addr);
}

+int kernel_init_text_address(unsigned long addr)
+{
+ if (core_kernel_init_text(addr))
+ return 1;
+ return is_module_init_text_address(addr);
+}
+
/*
* On some architectures (PPC64, IA64) function pointers
* are actually only tokens to some data that then holds the
diff --git a/kernel/module.c b/kernel/module.c
index 0a04983..f1fbeb0 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -2890,6 +2890,22 @@ bool is_module_text_address(unsigned long addr)
}

/*
+ * is_module_init_text_address - is this address inside a module's .init.text
+ * section?
+ * @addr: the address to check.
+ */
+bool is_module_init_text_address(unsigned long addr)
+{
+ bool ret;
+
+ preempt_disable();
+ ret = __module_init_text_address(addr) != NULL;
+ preempt_enable();
+
+ return ret;
+}
+
+/*
* __module_text_address - get the module whose code contains an address.
* @addr: the address.
*
@@ -2909,6 +2925,26 @@ struct module *__module_text_address(unsigned long addr)
}
EXPORT_SYMBOL_GPL(__module_text_address);

+/*
+ * __module_init_text_address - get the module whose .init.text contains an
+ * address.
+ * @addr: the address.
+ *
+ * Must be called with preempt disabled or module mutex held so that
+ * module doesn't get freed during this.
+ */
+struct module *__module_init_text_address(unsigned long addr)
+{
+ struct module *mod = __module_address(addr);
+ if (mod) {
+ /* Make sure it's within the .init.text section. */
+ if (!within(addr, mod->module_init, mod->init_text_size))
+ mod = NULL;
+ }
+ return mod;
+}
+EXPORT_SYMBOL_GPL(__module_init_text_address);
+
/* Don't grab lock, we're oopsing. */
void print_modules(void)
{
--
1.6.3.3

--
Pengutronix e.K. | Uwe Kleine-K�nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |

Finn Thain

unread,
Jul 21, 2009, 11:30:22 AM7/21/09
to

On Sat, 11 Jul 2009, Uwe Kleine-K?nig wrote:

> A pointer to mac_sonic_probe is passed to the core via
> platform_driver_register and so the function must not disappear when the

> .init sections are discarded. Otherwise (if also having HOTPLUG=y)
> unbinding and binding a device to the driver via sysfs will result in an
> oops as does a device being registered late.

This patch works for me (tested on a Quadra 630). I still get an oops on
rmmod, but that's a separate issue. I'll send a patch for that.

Finn

>
> Various other functions that are called by mac_sonic_probe need to move
> to .devinit.text, too.


>
> An alternative to this patch is using platform_driver_probe instead of
> platform_driver_register plus removing the pointer to the probe function
> from the struct platform_driver.
>

> Signed-off-by: Uwe Kleine-K?nig <u.klein...@pengutronix.de>


> Cc: Jeff Garzik <jga...@redhat.com>
> Cc: David S. Miller <da...@davemloft.net>

> Cc: Finn Thain <fth...@telegraphics.com.au>
> Cc: Geert Uytterhoeven <ge...@linux-m68k.org>


> Cc: Andrew Morton <ak...@linux-foundation.org>
> ---

> drivers/net/macsonic.c | 14 +++++++-------
> 1 files changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/net/macsonic.c b/drivers/net/macsonic.c
> index acd143d..8f492c7 100644
> --- a/drivers/net/macsonic.c
> +++ b/drivers/net/macsonic.c
> @@ -179,7 +179,7 @@ static const struct net_device_ops macsonic_netdev_ops = {
> .ndo_set_mac_address = eth_mac_addr,
> };
>
> -static int __init macsonic_init(struct net_device *dev)
> +static int __devinit macsonic_init(struct net_device *dev)
> {
> struct sonic_local* lp = netdev_priv(dev);
>
> @@ -223,7 +223,7 @@ static int __init macsonic_init(struct net_device *dev)
> return 0;
> }
>
> -static int __init mac_onboard_sonic_ethernet_addr(struct net_device *dev)
> +static int __devinit mac_onboard_sonic_ethernet_addr(struct net_device *dev)
> {
> struct sonic_local *lp = netdev_priv(dev);
> const int prom_addr = ONBOARD_SONIC_PROM_BASE;
> @@ -288,7 +288,7 @@ static int __init mac_onboard_sonic_ethernet_addr(struct net_device *dev)
> } else return 0;
> }
>
> -static int __init mac_onboard_sonic_probe(struct net_device *dev)
> +static int __devinit mac_onboard_sonic_probe(struct net_device *dev)
> {
> /* Bwahahaha */
> static int once_is_more_than_enough;
> @@ -409,7 +409,7 @@ static int __init mac_onboard_sonic_probe(struct net_device *dev)
> return macsonic_init(dev);
> }
>
> -static int __init mac_nubus_sonic_ethernet_addr(struct net_device *dev,
> +static int __devinit mac_nubus_sonic_ethernet_addr(struct net_device *dev,
> unsigned long prom_addr,
> int id)
> {
> @@ -424,7 +424,7 @@ static int __init mac_nubus_sonic_ethernet_addr(struct net_device *dev,
> return 0;
> }
>
> -static int __init macsonic_ident(struct nubus_dev *ndev)
> +static int __devinit macsonic_ident(struct nubus_dev *ndev)
> {
> if (ndev->dr_hw == NUBUS_DRHW_ASANTE_LC &&
> ndev->dr_sw == NUBUS_DRSW_SONIC_LC)
> @@ -449,7 +449,7 @@ static int __init macsonic_ident(struct nubus_dev *ndev)
> return -1;
> }
>
> -static int __init mac_nubus_sonic_probe(struct net_device *dev)
> +static int __devinit mac_nubus_sonic_probe(struct net_device *dev)
> {
> static int slots;
> struct nubus_dev* ndev = NULL;
> @@ -562,7 +562,7 @@ static int __init mac_nubus_sonic_probe(struct net_device *dev)
> return macsonic_init(dev);
> }
>
> -static int __init mac_sonic_probe(struct platform_device *pdev)
> +static int __devinit mac_sonic_probe(struct platform_device *pdev)
> {
> struct net_device *dev;
> struct sonic_local *lp;

David Miller

unread,
Jul 21, 2009, 3:30:20 PM7/21/09
to
From: Finn Thain <fth...@telegraphics.com.au>
Date: Wed, 22 Jul 2009 01:14:36 +1000 (EST)

>
>
> On Sat, 11 Jul 2009, Uwe Kleine-K?nig wrote:
>
>> A pointer to mac_sonic_probe is passed to the core via
>> platform_driver_register and so the function must not disappear when
>> the .init sections are discarded. Otherwise (if also having
>> HOTPLUG=y) unbinding and binding a device to the driver via sysfs will
>> result in an oops as does a device being registered late.
>
> This patch works for me (tested on a Quadra 630). I still get an oops
> on rmmod, but that's a separate issue. I'll send a patch for that.

Applied, but Uwe _please_ post networking patches to
net...@vger.kernel.org so that they get properly logged
and tracked at:

http://patchwork.ozlabs.org/project/netdev/list/

Thank you.

Uwe Kleine-König

unread,
Jul 21, 2009, 3:30:20 PM7/21/09
to
Hi Finn,

On Wed, Jul 22, 2009 at 01:14:36AM +1000, Finn Thain wrote:
> On Sat, 11 Jul 2009, Uwe Kleine-K?nig wrote:
>
>> A pointer to mac_sonic_probe is passed to the core via
>> platform_driver_register and so the function must not disappear when
>> the .init sections are discarded. Otherwise (if also having HOTPLUG=y)
>> unbinding and binding a device to the driver via sysfs will result in
>> an oops as does a device being registered late.
>
> This patch works for me (tested on a Quadra 630). I still get an oops on
> rmmod, but that's a separate issue. I'll send a patch for that.

Thanks, I'll add a

Tested-by: Finn Thain <fth...@telegraphics.com.au>

to the patch description.

--
Pengutronix e.K. | Uwe Kleine-K�nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |

Uwe Kleine-König

unread,
Jul 21, 2009, 3:50:06 PM7/21/09
to
Hi David,

On Tue, Jul 21, 2009 at 12:20:58PM -0700, David Miller wrote:
> From: Finn Thain <fth...@telegraphics.com.au>
> Date: Wed, 22 Jul 2009 01:14:36 +1000 (EST)
>
> > On Sat, 11 Jul 2009, Uwe Kleine-K?nig wrote:
> >
> >> A pointer to mac_sonic_probe is passed to the core via
> >> platform_driver_register and so the function must not disappear when
> >> the .init sections are discarded. Otherwise (if also having
> >> HOTPLUG=y) unbinding and binding a device to the driver via sysfs will
> >> result in an oops as does a device being registered late.
> >
> > This patch works for me (tested on a Quadra 630). I still get an oops
> > on rmmod, but that's a separate issue. I'll send a patch for that.
>
> Applied, but Uwe _please_ post networking patches to
> net...@vger.kernel.org so that they get properly logged
> and tracked at:

There are 8 patches in this series that touch drivers/net, only one of
them had a Cc: to netdev.

The diffstat of my series for drivers/net is
drivers/net/arm/am79c961a.c | 2 +-
drivers/net/arm/at91_ether.c | 2 +-
drivers/net/jazzsonic.c | 4 ++--
drivers/net/macsonic.c | 14 +++++++-------
drivers/net/meth.c | 2 +-
drivers/net/sb1250-mac.c | 2 +-
drivers/net/sgiseeq.c | 2 +-
drivers/net/xtsonic.c | 2 +-
8 files changed, 15 insertions(+), 15 deletions(-)

drivers/net/arm/at91_ether.c got a NACK by David Brownell---he wants the
alternative to be implemented.
drivers/net/arm/am79c961a.c got the Cc to netdev@
You now took drivers/net/macsonic.c.

Should I repost the remaining 5 to netdev@?

Best regards
Uwe

--
Pengutronix e.K. | Uwe Kleine-K�nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |

David Miller

unread,
Jul 21, 2009, 3:50:08 PM7/21/09
to
From: Uwe Kleine-K�nig <u.klein...@pengutronix.de>
Date: Tue, 21 Jul 2009 21:40:36 +0200

> Should I repost the remaining 5 to netdev@?

You should for at least the ones that don't require changes,
but once you fix those other one's up based upon feedback you
should make sure netdev at least gets CC:'d when you post
those too.

Uwe Kleine-König

unread,
Jul 21, 2009, 4:20:05 PM7/21/09
to
at91ether_probe lives in .init.text, so using platform_driver_register
to register it is wrong because binding a device after the init memory
is discarded (e.g. via sysfs) results in an oops.

As requested by David Brownell platform_driver_probe is used instead of
moving the probe function to .devinit.text as proposed initially.
This saves some memory, but devices registered after the driver is
probed are not bound (probably there are none) and binding via sysfs
isn't possible.

Signed-off-by: Uwe Kleine-König <u.klein...@pengutronix.de>
Cc: David Brownell <dbro...@users.sourceforge.net>
Cc: net...@vger.kernel.org
Cc: Paulius Zaleckas <paulius....@teltonika.lt>
Cc: Marc Pignat <marc....@hevs.ch>
Cc: Andrew Victor <li...@maxim.org.za>
Cc: Roel Kluin <12...@tiscali.nl>
Cc: Andrew Morton <ak...@linux-foundation.org>
Cc: Greg Kroah-Hartman <gre...@suse.de>

---
drivers/net/arm/at91_ether.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/net/arm/at91_ether.c b/drivers/net/arm/at91_ether.c
index 2e7419a..5041d10 100644
--- a/drivers/net/arm/at91_ether.c
+++ b/drivers/net/arm/at91_ether.c
@@ -1228,7 +1228,6 @@ static int at91ether_resume(struct platform_device *pdev)
#endif

static struct platform_driver at91ether_driver = {
- .probe = at91ether_probe,
.remove = __devexit_p(at91ether_remove),
.suspend = at91ether_suspend,
.resume = at91ether_resume,
@@ -1240,7 +1239,7 @@ static struct platform_driver at91ether_driver = {

static int __init at91ether_init(void)
{
- return platform_driver_register(&at91ether_driver);
+ return platform_driver_probe(&at91ether_driver, at91ether_probe);
}

static void __exit at91ether_exit(void)
--
tg: (4b0a840..) t/platsection/at91ether_driver (depends on: linus/master)

Uwe Kleine-König

unread,
Jul 21, 2009, 4:40:09 PM7/21/09
to
omap_mmc_probe lives in .init.text, so using platform_driver_register

to register it is wrong because binding a device after the init memory
is discarded (e.g. via sysfs) results in an oops.

As requested by David Brownell platform_driver_probe is used instead of
moving the probe function to .devinit.text as proposed initially.
This saves some memory, but devices registered after the driver is
probed are not bound (probably there are none) and binding via sysfs
isn't possible.

Signed-off-by: Uwe Kleine-König <u.klein...@pengutronix.de>
Cc: Jean Pihet <jpi...@mvista.com>
Cc: Tony Lindgren <to...@atomide.com>
Cc: Pierre Ossman <drz...@drzeus.cx>
Cc: Andy Lowe <al...@mvista.com>
Cc: Adrian Hunter <ext-adri...@nokia.com>
Cc: Andrew Morton <ak...@linux-foundation.org>
Cc: David Brownell <dbro...@users.sourceforge.net>
Cc: Madhusudhan Chikkature<madh...@ti.com>
Cc: Greg Kroah-Hartman <gre...@suse.de>

---
drivers/mmc/host/omap_hsmmc.c | 3 +--


1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index 1cf9cfb..40d9830 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -1307,7 +1307,6 @@ clk_en_err:
#endif

static struct platform_driver omap_mmc_driver = {
- .probe = omap_mmc_probe,
.remove = omap_mmc_remove,
.suspend = omap_mmc_suspend,
.resume = omap_mmc_resume,
@@ -1320,7 +1319,7 @@ static struct platform_driver omap_mmc_driver = {
static int __init omap_mmc_init(void)
{
/* Register the MMC driver */
- return platform_driver_register(&omap_mmc_driver);
+ return platform_driver_probe(&omap_mmc_driver, omap_mmc_probe);
}

static void __exit omap_mmc_cleanup(void)
--
tg: (4b0a840..) t/platsection/omap_mmc_driver (depends on: linus/master)

Uwe Kleine-König

unread,
Jul 21, 2009, 4:50:07 PM7/21/09
to
orion_nand_probe lives in .init.text, so using platform_driver_register

to register it is wrong because binding a device after the init memory
is discarded (e.g. via sysfs) results in an oops.

As requested by Nicolas Pitre platform_driver_probe is used instead of


moving the probe function to .devinit.text as proposed initially.
This saves some memory, but devices registered after the driver is
probed are not bound (probably there are none) and binding via sysfs
isn't possible.

Signed-off-by: Uwe Kleine-König <u.klein...@pengutronix.de>
Cc: Lennert Buytenhek <buy...@marvell.com>
Cc: Saeed Bishara <sa...@marvell.com>
Cc: Jörn Engel <jo...@logfs.org>
Cc: Nicolas Pitre <ni...@marvell.com>
Cc: Tzachi Perelstein <tza...@marvell.com>
Cc: Andrew Morton <ak...@linux-foundation.org>
Cc: Greg Kroah-Hartman <gre...@suse.de>
Cc: David Woodhouse <dw...@infradead.org>
Cc: linu...@lists.infradead.org

---
drivers/mtd/nand/orion_nand.c | 3 +--


1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/nand/orion_nand.c b/drivers/mtd/nand/orion_nand.c
index 7ad9722..cb9d13b 100644
--- a/drivers/mtd/nand/orion_nand.c
+++ b/drivers/mtd/nand/orion_nand.c
@@ -171,7 +171,6 @@ static int __devexit orion_nand_remove(struct platform_device *pdev)
}

static struct platform_driver orion_nand_driver = {
- .probe = orion_nand_probe,
.remove = __devexit_p(orion_nand_remove),
.driver = {
.name = "orion_nand",
@@ -181,7 +180,7 @@ static struct platform_driver orion_nand_driver = {

static int __init orion_nand_init(void)
{
- return platform_driver_register(&orion_nand_driver);
+ return platform_driver_probe(&orion_nand_driver, orion_nand_probe);
}

static void __exit orion_nand_exit(void)
--
tg: (4b0a840..) t/platsection/orion_nand_driver (depends on: linus/master)

Nicolas Pitre

unread,
Jul 21, 2009, 6:30:15 PM7/21/09
to
On Tue, 21 Jul 2009, Uwe Kleine-König wrote:

> orion_nand_probe lives in .init.text, so using platform_driver_register
> to register it is wrong because binding a device after the init memory
> is discarded (e.g. via sysfs) results in an oops.
>
> As requested by Nicolas Pitre platform_driver_probe is used instead of
> moving the probe function to .devinit.text as proposed initially.
> This saves some memory, but devices registered after the driver is
> probed are not bound (probably there are none) and binding via sysfs
> isn't possible.
>
> Signed-off-by: Uwe Kleine-König <u.klein...@pengutronix.de>
> Cc: Lennert Buytenhek <buy...@marvell.com>
> Cc: Saeed Bishara <sa...@marvell.com>
> Cc: Jörn Engel <jo...@logfs.org>
> Cc: Nicolas Pitre <ni...@marvell.com>
> Cc: Tzachi Perelstein <tza...@marvell.com>
> Cc: Andrew Morton <ak...@linux-foundation.org>
> Cc: Greg Kroah-Hartman <gre...@suse.de>
> Cc: David Woodhouse <dw...@infradead.org>
> Cc: linu...@lists.infradead.org

Acked-by: Nicolas Pitre <ni...@marvell.com>

Thanks. BTW Tzachi's email address is no longer valid.

Uwe Kleine-König

unread,
Jul 22, 2009, 1:20:15 AM7/22/09
to
Hi Nicolas,

On Tue, Jul 21, 2009 at 06:26:50PM -0400, Nicolas Pitre wrote:


> On Tue, 21 Jul 2009, Uwe Kleine-K�nig wrote:
>
> > orion_nand_probe lives in .init.text, so using platform_driver_register
> > to register it is wrong because binding a device after the init memory
> > is discarded (e.g. via sysfs) results in an oops.
> >
> > As requested by Nicolas Pitre platform_driver_probe is used instead of
> > moving the probe function to .devinit.text as proposed initially.
> > This saves some memory, but devices registered after the driver is
> > probed are not bound (probably there are none) and binding via sysfs
> > isn't possible.
> >

> > Signed-off-by: Uwe Kleine-K�nig <u.klein...@pengutronix.de>


> > Cc: Lennert Buytenhek <buy...@marvell.com>
> > Cc: Saeed Bishara <sa...@marvell.com>

> > Cc: J�rn Engel <jo...@logfs.org>


> > Cc: Nicolas Pitre <ni...@marvell.com>
> > Cc: Tzachi Perelstein <tza...@marvell.com>
> > Cc: Andrew Morton <ak...@linux-foundation.org>
> > Cc: Greg Kroah-Hartman <gre...@suse.de>
> > Cc: David Woodhouse <dw...@infradead.org>
> > Cc: linu...@lists.infradead.org
>
> Acked-by: Nicolas Pitre <ni...@marvell.com>

Did you test if all devices bind as expected?



> Thanks. BTW Tzachi's email address is no longer valid.

Yes, I got a mail from Marvell's mailer daemon stating the same. :-)

Best regards
Uwe

--
Pengutronix e.K. | Uwe Kleine-K�nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |

David Brownell

unread,
Jul 22, 2009, 1:40:09 PM7/22/09
to
On Tuesday 21 July 2009, Uwe Kleine-K�nig wrote:
> omap_mmc_probe lives in .init.text, so using platform_driver_register
> to register it is wrong because binding a device after the init memory
> is discarded (e.g. via sysfs) results in an oops.
>
> As requested by David Brownell platform_driver_probe is used instead of
> moving the probe function to .devinit.text as proposed initially.
> This saves some memory, but devices registered after the driver is
> probed are not bound (probably there are none) and binding via sysfs
> isn't possible.
>
> Signed-off-by: Uwe Kleine-K�nig <u.klein...@pengutronix.de>

> Cc: Jean Pihet <jpi...@mvista.com>
> Cc: Tony Lindgren <to...@atomide.com>
> Cc: Pierre Ossman <drz...@drzeus.cx>
> Cc: Andy Lowe <al...@mvista.com>
> Cc: Adrian Hunter <ext-adri...@nokia.com>
> Cc: Andrew Morton <ak...@linux-foundation.org>
> Cc: David Brownell <dbro...@users.sourceforge.net>

Acked-by: David Brownell <dbro...@users.sourceforge.net>

David Brownell

unread,
Jul 22, 2009, 1:40:15 PM7/22/09
to
On Tuesday 21 July 2009, Uwe Kleine-K�nig wrote:
> at91ether_probe lives in .init.text, so using platform_driver_register
> to register it is wrong because binding a device after the init memory
> is discarded (e.g. via sysfs) results in an oops.
>
> As requested by David Brownell platform_driver_probe is used instead of
> moving the probe function to .devinit.text as proposed initially.
> This saves some memory, but devices registered after the driver is
> probed are not bound (probably there are none) and binding via sysfs
> isn't possible.

Right, these devices do not hotplug.

>
> Signed-off-by: Uwe Kleine-K�nig <u.klein...@pengutronix.de>
> Cc: David Brownell <dbro...@users.sourceforge.net>

Acked-by: David Brownell <dbro...@users.sourceforge.net>

.... and thanks for doing it this way. :)

Andrew Victor

unread,
Jul 22, 2009, 1:50:34 PM7/22/09
to
hi,

> at91ether_probe lives in .init.text, so using platform_driver_register
> to register it is wrong because binding a device after the init memory
> is discarded (e.g. via sysfs) results in an oops.
>
> As requested by David Brownell platform_driver_probe is used instead of
> moving the probe function to .devinit.text as proposed initially.
> This saves some memory, but devices registered after the driver is
> probed are not bound (probably there are none) and binding via sysfs
> isn't possible.


Acked-by: Andrew Victor <li...@maxim.org.za>

David Miller

unread,
Jul 22, 2009, 2:30:15 PM7/22/09
to
From: Andrew Victor <avict...@gmail.com>
Date: Wed, 22 Jul 2009 19:46:24 +0200

> hi,
>
>> at91ether_probe lives in .init.text, so using platform_driver_register
>> to register it is wrong because binding a device after the init memory
>> is discarded (e.g. via sysfs) results in an oops.
>>
>> As requested by David Brownell platform_driver_probe is used instead of
>> moving the probe function to .devinit.text as proposed initially.
>> This saves some memory, but devices registered after the driver is
>> probed are not bound (probably there are none) and binding via sysfs
>> isn't possible.
>
>
> Acked-by: Andrew Victor <li...@maxim.org.za>

Applied, thanks everyone.

Jiri Kosina

unread,
Aug 13, 2009, 6:00:20 AM8/13/09
to
On Sat, 11 Jul 2009, Uwe Kleine-König wrote:

> A pointer to stk17ta8_rtc_probe is passed to the core via


> platform_driver_register and so the function must not disappear when the
> .init sections are discarded. Otherwise (if also having HOTPLUG=y)
> unbinding and binding a device to the driver via sysfs will result in an
> oops as does a device being registered late.
>

> An alternative to this patch is using platform_driver_probe instead of
> platform_driver_register plus removing the pointer to the probe function
> from the struct platform_driver.
>

> Signed-off-by: Uwe Kleine-König <u.klein...@pengutronix.de>
> Cc: Anton Vorontsov <avoro...@ru.mvista.com>
> Cc: Alessandro Zummo <a.z...@towertech.it>
> Cc: David Brownell <dbro...@users.sourceforge.net>
> Cc: Paul Mundt <let...@linux-sh.org>
> Cc: Andrew Morton <ak...@linux-foundation.org>
> Cc: Hannes Eder <han...@hanneseder.net>
> Cc: Jiri Kosina <jko...@suse.cz>
> Cc: David Brownell <dbro...@users.sourceforge.net>
> ---
> drivers/rtc/rtc-stk17ta8.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/rtc/rtc-stk17ta8.c b/drivers/rtc/rtc-stk17ta8.c
> index 7d1547b..d491eb2 100644
> --- a/drivers/rtc/rtc-stk17ta8.c
> +++ b/drivers/rtc/rtc-stk17ta8.c
> @@ -286,7 +286,7 @@ static struct bin_attribute stk17ta8_nvram_attr = {
> .write = stk17ta8_nvram_write,
> };
>
> -static int __init stk17ta8_rtc_probe(struct platform_device *pdev)
> +static int __devinit stk17ta8_rtc_probe(struct platform_device *pdev)
> {
> struct rtc_device *rtc;
> struct resource *res;

Has this been picked up by anyone? I don't seem to see it in linux-next as
of today.

--
Jiri Kosina
SUSE Labs

Uwe Kleine-König

unread,
Sep 7, 2009, 10:20:08 AM9/7/09
to
Hi Greg,

On Sat, Jul 11, 2009 at 10:05:48AM -0700, Greg KH wrote:
> On Sat, Jul 11, 2009 at 12:00:14PM +0200, Uwe Kleine-K�nig wrote:
> > Hi Greg,
> >
> > > > Are you conviced and took the patch or did you give up to convince me?
> > >
> > > Heh, no, sorry, it got burried in my queue.
> > >
> > > > I still think the patch is correct and I'd like to have it applied.
> > >
> > > Ok, let's test it out in the linux-next tree for a while to make sure it
> > > works properly. Care to send me an updated version?
> > I updated to latest Linus' master. It applies to linux-next from
> > Fri Jul 10 14:44:30 2009 +1000 as is.
>

> Thanks, I'll apply it later today to my trees.
ping?!

> > Back some time I sent a series that fixes many of these bugs. I will
> > update it later today and resend.
>

> Thanks, that would be good to have, to keep the noise down for devices
> we already know about.

Best regards
Uwe

--
Pengutronix e.K. | Uwe Kleine-K�nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |

David Woodhouse

unread,
Sep 19, 2009, 7:20:05 PM9/19/09
to
On Sat, 2009-07-11 at 13:52 -0700, Uwe Kleine-König wrote:
> A pointer to flctl_probe is passed to the core via

> platform_driver_register and so the function must not disappear when the
> .init sections are discarded. Otherwise (if also having HOTPLUG=y)
> unbinding and binding a device to the driver via sysfs will result in an
> oops as does a device being registered late.
>
> An alternative to this patch is using platform_driver_probe instead of
> platform_driver_register plus removing the pointer to the probe function
> from the struct platform_driver.

... which is what you did for orion_nand, so let's do that for sh_flctl
too.

http://git.infradead.org/mtd-2.6.git/commitdiff/894572a3635

--
David Woodhouse Open Source Technology Centre
David.W...@intel.com Intel Corporation

Uwe Kleine-König

unread,
Sep 21, 2009, 3:50:05 AM9/21/09
to
Hello,

On Sat, Sep 19, 2009 at 04:09:54PM -0700, David Woodhouse wrote:


> On Sat, 2009-07-11 at 13:52 -0700, Uwe Kleine-K�nig wrote:
> > A pointer to flctl_probe is passed to the core via
> > platform_driver_register and so the function must not disappear when the
> > .init sections are discarded. Otherwise (if also having HOTPLUG=y)
> > unbinding and binding a device to the driver via sysfs will result in an
> > oops as does a device being registered late.
> >
> > An alternative to this patch is using platform_driver_probe instead of
> > platform_driver_register plus removing the pointer to the probe function
> > from the struct platform_driver.
>
> ... which is what you did for orion_nand, so let's do that for sh_flctl
> too.
>
> http://git.infradead.org/mtd-2.6.git/commitdiff/894572a3635

Ah, you already did it, fine. If you want (and still can) you can add
my Acked-by:

Best regards, thanks
Uwe

--
Pengutronix e.K. | Uwe Kleine-K�nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |

Uwe Kleine-König

unread,
Sep 21, 2009, 4:00:12 AM9/21/09
to
Hello Greg,

On Sat, Jul 11, 2009 at 10:05:48AM -0700, Greg KH wrote:
> On Sat, Jul 11, 2009 at 12:00:14PM +0200, Uwe Kleine-K�nig wrote:
> > Hi Greg,
> >
> > > > Are you conviced and took the patch or did you give up to convince me?
> > >
> > > Heh, no, sorry, it got burried in my queue.

I assume this is normal for you? :-)

> > > > I still think the patch is correct and I'd like to have it applied.
> > >
> > > Ok, let's test it out in the linux-next tree for a while to make sure it
> > > works properly. Care to send me an updated version?
> > I updated to latest Linus' master. It applies to linux-next from
> > Fri Jul 10 14:44:30 2009 +1000 as is.
>
> Thanks, I'll apply it later today to my trees.
>

> > Back some time I sent a series that fixes many of these bugs. I will
> > update it later today and resend.
>
> Thanks, that would be good to have, to keep the noise down for devices
> we already know about.

As of today I don't see my patches in linux-next. Are you still
interested? Can I ease taking the patches for you somehow? E.g. by
sending a tar containing a quilt series?

Do you think it would be more sensible to convert the drivers to use
platform_driver_probe as this is what some commentors request.
The downside is that these can result in regressions (i.e. no driver
binding if the device is created after the driver is registered).
So this would be merge-window material.

Best regards

Jiri Kosina

unread,
Oct 9, 2009, 11:30:08 AM10/9/09
to
On Sat, 11 Jul 2009, Uwe Kleine-König wrote:

> A pointer to stk17ta8_rtc_probe is passed to the core via


> platform_driver_register and so the function must not disappear when the
> .init sections are discarded. Otherwise (if also having HOTPLUG=y)
> unbinding and binding a device to the driver via sysfs will result in an
> oops as does a device being registered late.
>
> An alternative to this patch is using platform_driver_probe instead of
> platform_driver_register plus removing the pointer to the probe function
> from the struct platform_driver.
>

> Signed-off-by: Uwe Kleine-König <u.klein...@pengutronix.de>
> Cc: Anton Vorontsov <avoro...@ru.mvista.com>
> Cc: Alessandro Zummo <a.z...@towertech.it>
> Cc: David Brownell <dbro...@users.sourceforge.net>
> Cc: Paul Mundt <let...@linux-sh.org>
> Cc: Andrew Morton <ak...@linux-foundation.org>
> Cc: Hannes Eder <han...@hanneseder.net>
> Cc: Jiri Kosina <jko...@suse.cz>
> Cc: David Brownell <dbro...@users.sourceforge.net>
> ---
> drivers/rtc/rtc-stk17ta8.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/rtc/rtc-stk17ta8.c b/drivers/rtc/rtc-stk17ta8.c
> index 7d1547b..d491eb2 100644
> --- a/drivers/rtc/rtc-stk17ta8.c
> +++ b/drivers/rtc/rtc-stk17ta8.c
> @@ -286,7 +286,7 @@ static struct bin_attribute stk17ta8_nvram_attr = {
> .write = stk17ta8_nvram_write,
> };
>
> -static int __init stk17ta8_rtc_probe(struct platform_device *pdev)
> +static int __devinit stk17ta8_rtc_probe(struct platform_device *pdev)
> {
> struct rtc_device *rtc;
> struct resource *res;

This seems to get lost ... should I take it through my tree, or is anyone
going to merge it? Andrew? Alessandro?

--
Jiri Kosina
SUSE Labs, Novell Inc.

Alessandro Zummo

unread,
Oct 9, 2009, 2:50:10 PM10/9/09
to
On Fri, 9 Oct 2009 17:24:51 +0200 (CEST)
Jiri Kosina <jko...@suse.cz> wrote:

> > -static int __init stk17ta8_rtc_probe(struct platform_device *pdev)
> > +static int __devinit stk17ta8_rtc_probe(struct platform_device *pdev)
> > {
> > struct rtc_device *rtc;
> > struct resource *res;
>
> This seems to get lost ... should I take it through my tree, or is anyone
> going to merge it? Andrew? Alessandro?

Did you sent it to the rtc mailing list? I can't find it in patchwork.
You can carry it in your tree.

Acked-by: Alessandro Zummo <a.z...@towertech.it>

--

Best regards,

Alessandro Zummo,
Tower Technologies - Torino, Italy

http://www.towertech.it

Jiri Kosina

unread,
Oct 9, 2009, 5:40:08 PM10/9/09
to
On Fri, 9 Oct 2009, Alessandro Zummo wrote:

> > > -static int __init stk17ta8_rtc_probe(struct platform_device *pdev)
> > > +static int __devinit stk17ta8_rtc_probe(struct platform_device *pdev)
> > > {
> > > struct rtc_device *rtc;
> > > struct resource *res;
> >
> > This seems to get lost ... should I take it through my tree, or is anyone
> > going to merge it? Andrew? Alessandro?
> Did you sent it to the rtc mailing list? I can't find it in patchwork.

It was probably sent only to you personally ...

> You can carry it in your tree.
> Acked-by: Alessandro Zummo <a.z...@towertech.it>

Queued, thanks.

--
Jiri Kosina
SUSE Labs, Novell Inc.

Alessandro Zummo

unread,
Oct 9, 2009, 6:10:06 PM10/9/09
to
On Fri, 9 Oct 2009 23:22:52 +0200 (CEST)
Jiri Kosina <jko...@suse.cz> wrote:

> It was probably sent only to you personally ...

Always Cc the mailing list, that way it will enter patchwork.
I'm bad enough at patch tracking and patchwork gives a nice help ;)


--

Best regards,

Alessandro Zummo,
Tower Technologies - Torino, Italy

http://www.towertech.it

--

Uwe Kleine-König

unread,
Jan 22, 2010, 12:10:03 PM1/22/10
to
Hello,

On Mon, Sep 07, 2009 at 04:19:41PM +0200, Uwe Kleine-K�nig wrote:
> Hi Greg,
>
> On Sat, Jul 11, 2009 at 10:05:48AM -0700, Greg KH wrote:
> > On Sat, Jul 11, 2009 at 12:00:14PM +0200, Uwe Kleine-K�nig wrote:
> > > Hi Greg,
> > >
> > > > > Are you conviced and took the patch or did you give up to convince me?
> > > >
> > > > Heh, no, sorry, it got burried in my queue.
> > > >
> > > > > I still think the patch is correct and I'd like to have it applied.
> > > >
> > > > Ok, let's test it out in the linux-next tree for a while to make sure it
> > > > works properly. Care to send me an updated version?
> > > I updated to latest Linus' master. It applies to linux-next from
> > > Fri Jul 10 14:44:30 2009 +1000 as is.
> >
> > Thanks, I'll apply it later today to my trees.
> ping?!
>
> > > Back some time I sent a series that fixes many of these bugs. I will
> > > update it later today and resend.
> >
> > Thanks, that would be good to have, to keep the noise down for devices
> > we already know about.

ping? I assume you don't have the original mails anymore, so should I
resend?

Greg KH

unread,
Jan 22, 2010, 12:50:02 PM1/22/10
to
On Fri, Jan 22, 2010 at 06:06:41PM +0100, Uwe Kleine-K�nig wrote:
> Hello,
>
> On Mon, Sep 07, 2009 at 04:19:41PM +0200, Uwe Kleine-K�nig wrote:
> > Hi Greg,
> >
> > On Sat, Jul 11, 2009 at 10:05:48AM -0700, Greg KH wrote:
> > > On Sat, Jul 11, 2009 at 12:00:14PM +0200, Uwe Kleine-K�nig wrote:
> > > > Hi Greg,
> > > >
> > > > > > Are you conviced and took the patch or did you give up to convince me?
> > > > >
> > > > > Heh, no, sorry, it got burried in my queue.
> > > > >
> > > > > > I still think the patch is correct and I'd like to have it applied.
> > > > >
> > > > > Ok, let's test it out in the linux-next tree for a while to make sure it
> > > > > works properly. Care to send me an updated version?
> > > > I updated to latest Linus' master. It applies to linux-next from
> > > > Fri Jul 10 14:44:30 2009 +1000 as is.
> > >
> > > Thanks, I'll apply it later today to my trees.
> > ping?!
> >
> > > > Back some time I sent a series that fixes many of these bugs. I will
> > > > update it later today and resend.
> > >
> > > Thanks, that would be good to have, to keep the noise down for devices
> > > we already know about.
> ping? I assume you don't have the original mails anymore, so should I
> resend?

Yes, sorry.

thanks,

greg k-h

It is loading more messages.
0 new messages