Patch "Revert :can: sja1000: fix handling on dt properties on little endian systems"" has been added to the 3.0-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    Revert :can: sja1000: fix handling on dt properties on little endian systems"

to the 3.0-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     revert-can-sja1000-fix-handling-on-dt-properties-on-little-endian-systems.patch
and it can be found in the queue-3.0 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From foo@baz Mon May  6 11:30:43 PDT 2013
Date: Mon, 06 May 2013 11:30:43 -0700
To: Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx>
From: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Subject: Revert :can: sja1000: fix handling on dt properties on little endian systems"

This reverts commit 55fe10a686c3a8bce7bddc149e4ebb12f5a18c25 which is
commit 0443de5fbf224abf41f688d8487b0c307dc5a4b4 upstream.

This causes a build breakage on 3.0, so we shouldn't apply it to that
tree.


Reported-by: Jiri Slaby <jslaby@xxxxxxx>
Cc: Christoph Fritz <chf.fritz@xxxxxxxxxxxxxx>
Cc: Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

---
 drivers/net/can/sja1000/sja1000_of_platform.c |   31 +++++++++++++-------------
 1 file changed, 16 insertions(+), 15 deletions(-)

--- a/drivers/net/can/sja1000/sja1000_of_platform.c
+++ b/drivers/net/can/sja1000/sja1000_of_platform.c
@@ -93,8 +93,8 @@ static int __devinit sja1000_ofp_probe(s
 	struct net_device *dev;
 	struct sja1000_priv *priv;
 	struct resource res;
-	u32 prop;
-	int err, irq, res_size;
+	const u32 *prop;
+	int err, irq, res_size, prop_size;
 	void __iomem *base;
 
 	err = of_address_to_resource(np, 0, &res);
@@ -135,27 +135,27 @@ static int __devinit sja1000_ofp_probe(s
 	priv->read_reg = sja1000_ofp_read_reg;
 	priv->write_reg = sja1000_ofp_write_reg;
 
-	err = of_property_read_u32(np, "nxp,external-clock-frequency", &prop);
-	if (!err)
-		priv->can.clock.freq = prop / 2;
+	prop = of_get_property(np, "nxp,external-clock-frequency", &prop_size);
+	if (prop && (prop_size ==  sizeof(u32)))
+		priv->can.clock.freq = *prop / 2;
 	else
 		priv->can.clock.freq = SJA1000_OFP_CAN_CLOCK; /* default */
 
-	err = of_property_read_u32(np, "nxp,tx-output-mode", &prop);
-	if (!err)
-		priv->ocr |= prop & OCR_MODE_MASK;
+	prop = of_get_property(np, "nxp,tx-output-mode", &prop_size);
+	if (prop && (prop_size == sizeof(u32)))
+		priv->ocr |= *prop & OCR_MODE_MASK;
 	else
 		priv->ocr |= OCR_MODE_NORMAL; /* default */
 
-	err = of_property_read_u32(np, "nxp,tx-output-config", &prop);
-	if (!err)
-		priv->ocr |= (prop << OCR_TX_SHIFT) & OCR_TX_MASK;
+	prop = of_get_property(np, "nxp,tx-output-config", &prop_size);
+	if (prop && (prop_size == sizeof(u32)))
+		priv->ocr |= (*prop << OCR_TX_SHIFT) & OCR_TX_MASK;
 	else
 		priv->ocr |= OCR_TX0_PULLDOWN; /* default */
 
-	err = of_property_read_u32(np, "nxp,clock-out-frequency", &prop);
-	if (!err && prop) {
-		u32 divider = priv->can.clock.freq * 2 / prop;
+	prop = of_get_property(np, "nxp,clock-out-frequency", &prop_size);
+	if (prop && (prop_size == sizeof(u32)) && *prop) {
+		u32 divider = priv->can.clock.freq * 2 / *prop;
 
 		if (divider > 1)
 			priv->cdr |= divider / 2 - 1;
@@ -165,7 +165,8 @@ static int __devinit sja1000_ofp_probe(s
 		priv->cdr |= CDR_CLK_OFF; /* default */
 	}
 
-	if (!of_property_read_bool(np, "nxp,no-comparator-bypass"))
+	prop = of_get_property(np, "nxp,no-comparator-bypass", NULL);
+	if (!prop)
 		priv->cdr |= CDR_CBP; /* default */
 
 	priv->irq_flags = IRQF_SHARED;


Patches currently in stable-queue which might be from gregkh@xxxxxxxxxxxxxxxxxxx are

queue-3.0/usbfs-always-allow-ctrl-requests-with-usb_recip_endpoint-on-the-ctrl-ep.patch
queue-3.0/nfsv4-handle-nfs4err_delay-and-nfs4err_grace-in-nfs4_open_delegation_recall.patch
queue-3.0/powerpc-spufs-initialise-inode-i_ino-in-spufs_new_inode.patch
queue-3.0/tracing-fix-off-by-one-on-allocating-stat-pages.patch
queue-3.0/mmc-core-fix-bit-width-test-failing-on-old-emmc-cards.patch
queue-3.0/clockevents-set-dummy-handler-on-cpu_dead-shutdown.patch
queue-3.0/drivers-rtc-rtc-cmos.c-don-t-disable-hpet-emulation-on-suspend.patch
queue-3.0/i2c-xiic-must-always-write-16-bit-words-to-tx_fifo.patch
queue-3.0/wrong-asm-register-contraints-in-the-futex-implementation.patch
queue-3.0/nfsd-decode-and-send-64bit-time-values.patch
queue-3.0/usb-option-add-a-d-link-dwm-156-variant.patch
queue-3.0/ext4-fix-kconfig-documentation-for-config_ext4_debug.patch
queue-3.0/usb-add-ftdi_sio-usb-id-for-gdm-boost-v1.x.patch
queue-3.0/tracing-use-stack-of-calling-function-for-stack-tracer.patch
queue-3.0/hrtimer-fix-ktime_add_ns-overflow-on-32bit-architectures.patch
queue-3.0/usb-ftdi_sio-correct-st-micro-connect-lite-pids.patch
queue-3.0/alsa-usb-audio-fix-autopm-error-during-probing.patch
queue-3.0/alsa-usb-audio-disable-autopm-for-midi-devices.patch
queue-3.0/tracing-fix-stack-tracer-with-fentry-use.patch
queue-3.0/fbcon-when-font-is-freed-clear-also-vc_font.data.patch
queue-3.0/x86-eliminate-irq_mis_count-counted-in-arch_irq_stat.patch
queue-3.0/tracing-remove-most-or-all-of-stack-tracer-stack-size-from-stack_max_size.patch
queue-3.0/cgroup-fix-an-off-by-one-bug-which-may-trigger-bug_on.patch
queue-3.0/fix-initialization-of-cmci-cmcp-interrupts.patch
queue-3.0/asoc-max98088-fix-logging-of-hardware-revision.patch
queue-3.0/hrtimer-add-expiry-time-overflow-check-in-hrtimer_interrupt.patch
queue-3.0/powerpc-add-isync-to-copy_and_flush.patch
queue-3.0/tracing-reset-ftrace_graph_filter_enabled-if-count-is-zero.patch
queue-3.0/s390-memory-hotplug-prevent-offline-of-active-memory-increments.patch
queue-3.0/usb-storage-cy7c68300a-chips-do-not-support-cypress-atacb.patch
queue-3.0/fs-fscache-stats.c-fix-memory-leak.patch
queue-3.0/mfd-adp5520-restore-mode-bits-on-resume.patch
queue-3.0/nfsd4-don-t-close-read-write-opens-too-soon.patch
queue-3.0/serial_core.c-add-put_device-after-device_find_child.patch
queue-3.0/xen-time-fix-kasprintf-splat-when-allocating-timer-d-irq-line.patch
queue-3.0/wrong-asm-register-contraints-in-the-kvm-implementation.patch
queue-3.0/tty-fix-up-atime-mtime-mess-take-three.patch
queue-3.0/usb-serial-option-added-support-olivetti-olicard-145.patch
queue-3.0/wireless-regulatory-fix-channel-disabling-race-condition.patch
queue-3.0/usb-misc-appledisplay-add-24-led-cinema-display.patch
queue-3.0/ipc-sysv-shared-memory-limited-to-8tib.patch
queue-3.0/tracing-check-return-value-of-tracing_init_dentry.patch
queue-3.0/lockd-ensure-that-nlmclnt_block-resets-block-b_status-after-a-server-reboot.patch
queue-3.0/pci-acpi-don-t-query-osc-support-with-all-possible-controls.patch
queue-3.0/revert-can-sja1000-fix-handling-on-dt-properties-on-little-endian-systems.patch
queue-3.0/s390-move-dummy-io_remap_pfn_range-to-asm-pgtable.h.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]