aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-08-17Yama: access task_struct->comm directlyKees Cook1-8/+2
The core ptrace access checking routine holds a task lock, and when reporting a failure, Yama takes a separate task lock. To avoid a potential deadlock with two ptracers taking the opposite locks, do not use get_task_comm() and just use ->comm directly since accuracy is not important for the report. Reported-by: Fengguang Wu <[email protected]> Suggested-by: Oleg Nesterov <[email protected]> CC: [email protected] Signed-off-by: Kees Cook <[email protected]> Acked-by: John Johansen <[email protected]> Signed-off-by: James Morris <[email protected]>
2012-08-17pinctrl/nomadik: add kp_b_2 keyboard function group listPatrice Chotard1-1/+4
There is yet another way to mux the keyboard, so fix up that group. Signed-off-by: Patrice Chotard <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2012-08-17pinctrl: imx51: fix .conf_reg of MX51_PAD_SD2_CMD__CSPI_MOSIShawn Guo1-1/+1
The .conf_reg of MX51_PAD_SD2_CMD__CSPI_MOSI should be 0x7bc rather than NO_PAD. This error will cause SD2 probe failure. Signed-off-by: Shawn Guo <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2012-08-17trivial: pinctrl core: remove extraneous code linesRichard Genoud1-10/+3
In function pinctrl_get_locked, pointer p is returned on error, and also return on no_error. So, we just return it with no error test. It's pretty the same in function pinctrl_lookup_state_locked: state is returned in every case, so we drop the error test and just return state. Signed-off-by: Richard Genoud <[email protected]>
2012-08-17pinctrl: header: trivial: declare struct deviceRichard Genoud1-0/+1
As struct device is used as a function argument, it should at least be declared (device.h is not included). Signed-off-by: Richard Genoud <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2012-08-17Documentation/pinctrl.txt: Fix some misspelled macrosDaniel Mack1-3/+3
Signed-off-by: Daniel Mack <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2012-08-17pinctrl/nomadik: fix null in irqdomain errorpathLinus Walleij1-1/+1
The irqdomain conversion failed to notice that we do not always have a DT node to dereference, fix this up by using a simple dev_err() that also tells the name of the device. Cc: Loic Pallardy <[email protected]> Cc: Patrice Chotard <[email protected]> Acked-by: Lee Jones <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2012-08-17drm/i915: fall back to bit-banging if GMBUS fails in CRT EDID readsJani Nikula1-3/+33
GMBUS was enabled over bit-banging as the default in commits: commit c3dfefa0a6d235bd465309e12f4c56ea16e71111 Author: Daniel Vetter <[email protected]> Date: Tue Feb 14 22:37:25 2012 +0100 drm/i915: reenable gmbus on gen3+ again and commit 0fb3f969c8683505fb7323c06bf8a999a5a45a15 Author: Daniel Vetter <[email protected]> Date: Fri Mar 2 19:38:30 2012 +0100 drm/i915: enable gmbus on gen2 Unfortunately, GMBUS seems to fail on some CRT displays. Add a bit-banging fallback to CRT EDID reads. LKML-Reference: <[email protected]> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=45881 Signed-off-by: Jani Nikula <[email protected]> Tested-by: Alex Ferrando <[email protected]> Cc: [email protected] (for 3.4+3.5) Signed-off-by: Daniel Vetter <[email protected]>
2012-08-17drm/i915: extract connector update from intel_ddc_get_modes() for reuseJani Nikula2-9/+24
Refactor the connector update part of intel_ddc_get_modes() into a separate intel_connector_update_modes() function for reuse. No functional changes. Signed-off-by: Jani Nikula <[email protected]> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=45881 Tested-by: Alex Ferrando <[email protected]> Cc: [email protected] (for 3.4+3.5) Signed-off-by: Daniel Vetter <[email protected]>
2012-08-17drm/i915: fix hsw uncached pteDaniel Vetter4-37/+75
They've changed it ... for no apparent reason. Meh. V2: remove unused 'is_hsw' field. Signed-off-by: Daniel Vetter <[email protected]> Signed-off-by: Paulo Zanoni <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
2012-08-17drm/i915/contexts: fix list corruptionBen Widawsky1-4/+4
After reset we unconditionally reinitialize lists. If the context switch hasn't yet completed before the suspend, the default context object will end up on lists that are going to go away when we resume. The patch forces the context switch to be synchronous before suspend assuring that the active/inactive tracking is correct at the time of resume. References: https://bugs.freedesktop.org/show_bug.cgi?id=52429 Tested-by: Guang A Yang <[email protected]> Signed-off-by: Ben Widawsky <[email protected]> Reviewed-by: Chris Wilson <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
2012-08-17drm/i915: fix EDID memory leak in SDVOJani Nikula1-0/+1
The EDID returned by drm_get_edid() was never freed. Signed-off-by: Jani Nikula <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
2012-08-16target/pscsi: Fix bug with REPORT_LUNs handling for SCSI passthroughNicholas Bellinger1-1/+8
This patch fixes a regression bug in pscsi_transport_complete() callback code where *pt was being NULL dereferenced during REPORT_LUNS handling, that was introduced with the spc/sbc refactoring in: commit 1fd032ee10d2816c947f5d5b9abda95e728f0a8f Author: Christoph Hellwig <[email protected]> Date: Sun May 20 11:59:15 2012 -0400 target: move code for CDB emulation As this is a special case for pscsi_parse_cdb() to call spc_parse_cdb() to allow TCM to handle REPORT_LUN emulation, pscsi_plugin_task will have not been allocated.. So now in pscsi_transport_complete() just check for existence of *pt and return for this special case. Reported-by: Alex Elsayed <[email protected]> Cc: Alex Elsayed <[email protected]> Cc: Christoph Hellwig <[email protected]> Signed-off-by: Nicholas Bellinger <[email protected]>
2012-08-16tcm_vhost: Change vhost_scsi_target->vhost_wwpn to char *Nicholas Bellinger1-1/+1
This patch changes the vhost_scsi_target->vhost_wwpn[] type used by VHOST_SCSI_* ioctls to 'char *' as requested by Blue Swirl in order to match the latest QEMU vhost-scsi RFC-v3 userspace code. Queuing this up into target-pending/master for a -rc3 PULL. Reported-by: Blue Swirl <[email protected]> Cc: Michael S. Tsirkin <[email protected]> Cc: Stefan Hajnoczi <[email protected]> Cc: Paolo Bonzini <[email protected]> Signed-off-by: Nicholas Bellinger <[email protected]>
2012-08-16target: fix NULL pointer dereference bug alloc_page() fails to get memoryYi Zou1-2/+2
I am hitting this bug when the target is low in memory that fails the alloc_page() for the newly submitted command. This is a sort of off-by-one bug causing NULL pointer dereference in __free_page() since 'i' here is really the counter of total pages that have been successfully allocated here. Signed-off-by: Yi Zou <[email protected]> Cc: Andy Grover <[email protected]> Cc: Nicholas Bellinger <[email protected]> Cc: Open-FCoE.org <[email protected]> Cc: [email protected] Signed-off-by: Nicholas Bellinger <[email protected]>
2012-08-16tcm_fc: Avoid debug overhead when not debuggingMark Rustad2-1/+8
Stop doing a pile of work related to debugging messages when the ft_debug_logging flag is not set. Use unlikely to add the check in a way that the check can be inlined without inlining the whole thing. Signed-off-by: Mark Rustad <[email protected]> Signed-off-by: Nicholas Bellinger <[email protected]>
2012-08-16tcm_vhost: Post-merge review changes requested by MSTNicholas Bellinger2-93/+111
This patch contains the post RFC-v5 (post-merge) changes, this includes: - Add locking comment - Move vhost_scsi_complete_cmd ahead of TFO callbacks in order to drop forward declarations - Drop extra '!= NULL' usage in vhost_scsi_complete_cmd_work() - Change vhost_scsi_*_handle_kick() to use pr_debug - Fix possible race in vhost_scsi_set_endpoint() for vs->vs_tpg checking + assignment. - Convert tv_tpg->tpg_vhost_count + ->tv_tpg_port_count from atomic_t -> int, and make sure reference is protected by ->tv_tpg_mutex. - Drop unnecessary vhost_scsi->vhost_ref_cnt - Add 'err:' label for exception path in vhost_scsi_clear_endpoint() - Add enum for VQ numbers, add usage in vhost_scsi_open() - Add vhost_scsi_flush() + vhost_scsi_flush_vq() following drivers/vhost/net.c - Add smp_wmb() + vhost_scsi_flush() call during vhost_scsi_set_features() - Drop unnecessary copy_from_user() usage with GET_ABI_VERSION ioctl - Add missing vhost_scsi_compat_ioctl() caller for vhost_scsi_fops - Fix function parameter definition first line to follow existing vhost code style - Change 'vHost' usage -> 'vhost' in handful of locations - Change -EPERM -> -EBUSY usage for two failures in tcm_vhost_drop_nexus() - Add comment for tcm_vhost_workqueue in tcm_vhost_init() - Make GET_ABI_VERSION return 'int' + add comment in tcm_vhost.h Reported-by: Michael S. Tsirkin <[email protected]> Cc: Michael S. Tsirkin <[email protected]> Cc: Stefan Hajnoczi <[email protected]> Cc: Anthony Liguori <[email protected]> Cc: Zhi Yong Wu <[email protected]> Cc: Paolo Bonzini <[email protected]> Signed-off-by: Nicholas Bellinger <[email protected]>
2012-08-16tcm_vhost: Fix incorrect IS_ERR() usage in vhost_scsi_map_iov_to_sglFengguang Wu1-2/+2
Fix up a new coccinelle warnings reported by Fengguang Wu + Intel 0-DAY kernel build testing backend: drivers/vhost/tcm_vhost.c:537:23-29: ERROR: allocation function on line 533 returns NULL not ERR_PTR on failure vim +537 drivers/vhost/tcm_vhost.c 534 if (!sg) 535 return -ENOMEM; 536 pr_debug("%s sg %p sgl_count %u is_err %ld\n", __func__, > 537 sg, sgl_count, IS_ERR(sg)); 538 sg_init_table(sg, sgl_count); 539 540 tv_cmd->tvc_sgl = sg; Signed-off-by: Fengguang Wu <[email protected]> Signed-off-by: Nicholas Bellinger <[email protected]>
2012-08-17m68k: select CONFIG_GENERIC_ATOMIC64 for all m68k CPU typesGreg Ungerer2-4/+1
There is no specific atomic64 support code for any m68k CPUs, so we should select CONFIG_GENERIC_ATOMC64 for all. Remove the existing per CPU selection of this and select it for all m68k. Signed-off-by: Greg Ungerer <[email protected]> Acked-by: Fengguang Wu <[email protected]> Acked-by: Geert Uytterhoeven <[email protected]>
2012-08-17m68knommu: select CONFIG_HAVE_CLK for ColdFire CPU typesGreg Ungerer1-0/+1
The ColdFire CPU sub-arch has kernel clk code support, so select CONFIG_HAVE_CLK. Signed-off-by: Greg Ungerer <[email protected]>
2012-08-16net: netprio: fix cgrp create and write priomap raceJohn Fastabend1-5/+3
A race exists where creating cgroups and also updating the priomap may result in losing a priomap update. This is because priomap writers are not protected by rtnl_lock. Move priority writer into rtnl_lock()/rtnl_unlock(). CC: Neil Horman <[email protected]> Reported-by: Al Viro <[email protected]> Signed-off-by: John Fastabend <[email protected]> Acked-by: Neil Horman <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-08-16net: netprio: fd passed in SCM_RIGHTS datagram not set correctlyJohn Fastabend1-0/+4
A socket fd passed in a SCM_RIGHTS datagram was not getting updated with the new tasks cgrp prioidx. This leaves IO on the socket tagged with the old tasks priority. To fix this add a check in the scm recvmsg path to update the sock cgrp prioidx with the new tasks value. Thanks to Al Viro for catching this. CC: Neil Horman <[email protected]> Reported-by: Al Viro <[email protected]> Signed-off-by: John Fastabend <[email protected]> Acked-by: Neil Horman <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-08-16net: netprio: fix files lock and remove useless d_path bitsJohn Fastabend1-18/+4
Add lock to prevent a race with a file closing and also remove useless and ugly sscanf code. The extra code was never needed and the case it supposedly protected against is in fact handled correctly by sock_from_file as pointed out by Al Viro. CC: Neil Horman <[email protected]> Reported-by: Al Viro <[email protected]> Signed-off-by: John Fastabend <[email protected]> Acked-by: Neil Horman <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-08-16act_mirred: do not drop packets when fails to mirror itJason Wang1-6/+5
We drop packet unconditionally when we fail to mirror it. This is not intended in some cases. Consdier for kvm guest, we may mirror the traffic of the bridge to a tap device used by a VM. When kernel fails to mirror the packet in conditions such as when qemu crashes or stop polling the tap, it's hard for the management software to detect such condition and clean the the mirroring before. This would lead all packets to the bridge to be dropped and break the netowrk of other virtual machines. To solve the issue, the patch does not drop packets when kernel fails to mirror it, and only drop the redirected packets. Signed-off-by: Jason Wang <[email protected]> Signed-off-by: Jamal Hadi Salim <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-08-16Linux 3.6-rc2Linus Torvalds1-1/+1
2012-08-16NFS: return -ENOKEY when the upcall fails to map the nameBryan Schumaker1-4/+2
This allows the normal error-paths to handle the error, rather than making a special call to complete_request_key() just for this instance. Signed-off-by: Bryan Schumaker <[email protected]> Tested-by: William Dauchy <[email protected]> Cc: [email protected] [>= 3.4] Signed-off-by: Trond Myklebust <[email protected]>
2012-08-16NFS: Clear key construction data if the idmap upcall failsBryan Schumaker1-14/+42
idmap_pipe_downcall already clears this field if the upcall succeeds, but if it fails (rpc.idmapd isn't running) the field will still be set on the next call triggering a BUG_ON(). This patch tries to handle all possible ways that the upcall could fail and clear the idmap key data for each one. Signed-off-by: Bryan Schumaker <[email protected]> Tested-by: William Dauchy <[email protected]> Cc: [email protected] [>= 3.4] Signed-off-by: Trond Myklebust <[email protected]>
2012-08-16Merge tag 'v3.6-rc1-iio-fixes' of ↵Greg Kroah-Hartman8-80/+116
git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus IIO fixes for v3.6-rc1 These mostly consist of fixes from Lars-Peter Clausen that were the first part of a large series reworking the drivers concerned. Turns out these drivers had quite a wealth of minor bugs. Also here are some build warning fixes for lm3533-als and adjd_s111 (both new drives in this cycle). Final elements are a a div factor overflow and a warning related fix in a couple of Analog Devices drivers. All in all nothing major, but a worthwhile bunch of short fixes.
2012-08-16NFSv4: Don't use private xdr_stream fields in decode_getaclTrond Myklebust1-5/+6
Instead of using the private field xdr->p from struct xdr_stream, use the public xdr_stream_pos(). Signed-off-by: Trond Myklebust <[email protected]>
2012-08-16NFSv4: Fix the acl cache size calculationTrond Myklebust1-2/+3
Currently, we do not take into account the size of the 16 byte struct nfs4_cached_acl header, when deciding whether or not we should cache the acl data. Consequently, we will end up allocating an 8k buffer in order to fit a maximum size 4k acl. This patch adjusts the calculation so that we limit the cache size to 4k for the acl header+data. Signed-off-by: Trond Myklebust <[email protected]>
2012-08-16NFSv4: Fix pointer arithmetic in decode_getaclTrond Myklebust2-15/+8
Resetting the cursor xdr->p to a previous value is not a safe practice: if the xdr_stream has crossed out of the initial iovec, then a bunch of other fields would need to be reset too. Fix this issue by using xdr_enter_page() so that the buffer gets page aligned at the bitmap _before_ we decode it. Also fix the confusion of the ACL length with the page buffer length by not adding the base offset to the ACL length... Signed-off-by: Trond Myklebust <[email protected]> Cc: [email protected]
2012-08-16NFS: Alias the nfs module to nfs4[email protected]1-0/+2
This allows distros to remove the line from their modprobe configuration. Signed-off-by: Bryan Schumaker <[email protected]> Cc: [email protected] Signed-off-by: Trond Myklebust <[email protected]>
2012-08-16NFS: Fix a regression when loading the NFS v4 module[email protected]5-26/+49
Some systems have a modprobe.d/nfs.conf file that sets an nfs4 alias pointing to nfs.ko, rather than nfs4.ko. This can prevent the v4 module from loading on mount, since the kernel sees that something named "nfs4" has already been loaded. To work around this, I've renamed the modules to "nfsv2.ko" "nfsv3.ko" and "nfsv4.ko". I also had to move the nfs4_fs_type back to nfs.ko to ensure that `mount -t nfs4` still works. Signed-off-by: Bryan Schumaker <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2012-08-161-Wire: Add support for the maxim ds1825 temperature sensorRaphael Assenat3-0/+12
This patch adds support for maxim ds1825 based 1-wire temperature sensors. Signed-off-by: Raphael Assenat <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-08-16ti-st: Fix check for pdata->chip_awake function pointerMatthias Kaehlcke1-1/+1
ll_device_want_to_wakeup(): Fix the NULL pointer check on pdata->chip_awake, which is performed on the wrong function pointer Signed-off-by: Matthias Kaehlcke <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-08-16iio: lm3533-als: Fix build warningsAxel Lin1-2/+2
Fix below build warnings: CC [M] drivers/iio/light/lm3533-als.o drivers/iio/light/lm3533-als.c:667:8: warning: initialization from incompatible pointer type [enabled by default] drivers/iio/light/lm3533-als.c:667:8: warning: (near initialization for 'dev_attr_in_illuminance0_thresh_either_en.show') [enabled by default] drivers/iio/light/lm3533-als.c:667:8: warning: initialization from incompatible pointer type [enabled by default] drivers/iio/light/lm3533-als.c:667:8: warning: (near initialization for 'dev_attr_in_illuminance0_thresh_either_en.store') [enabled by default] Signed-off-by: Axel Lin <[email protected]>
2012-08-16staging:iio:ad7780: Mark channels as unsignedLars-Peter Clausen1-4/+6
The values reported by the AD7780 are unsigned with a binary offset: 0x000000 is negative fullscale 0x800000 is zeroscale 0xffffff is positive fullscale So mark the channel in the channel spec as unsigned rather than signed. Signed-off-by: Lars-Peter Clausen <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
2012-08-16staging:iio:ad7192: Report offset and scale for temperature channelLars-Peter Clausen1-14/+12
The temperature channel reports values in degree Kelvin with sensitivity of 5630 codes per degree. If the chip is configured in bipolar mode there is an additional binary offset of 0x800000 and the sensitivity is divided by two. Currently the driver does the mapping from the raw value to degree Celsius when doing a manual conversion. This has several disadvantages, the major one being that it does not work for buffered mode, also by doing the division by the sensitivity in the driver the precession of the reported value is needlessly reduced. Furthermore the current calculation only works in bipolar mode and the current scale is of by a factor of 1000. This patch modifies the driver to report correct offset and scale values in both unipolar and bipolar mode and to report the raw temperature value for manual conversions. Signed-off-by: Lars-Peter Clausen <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
2012-08-16staging:iio:ad7192: Report channel offsetLars-Peter Clausen1-4/+10
In bipolar mode there is a a binary offset of 2**(N-1) (with N being the number of bits) on the reported value. Currently this value is subtracted when doing a manual read. While this works for manual channel readings it does not work for buffered mode. So report the offset in the channels offset property, which will work in both modes. Signed-off-by: Lars-Peter Clausen <[email protected]>
2012-08-16staging:iio:ad7192: Mark channels as unsignedLars-Peter Clausen1-3/+3
The values reported by the AD7793 are unsigned. In uniploar mode: 0x000000 is zeroscale 0xffffff is fullscale In bipolar mode: 0x000000 is negative fullscale 0x800000 is zeroscale 0xffffff is positive fullscale In bipolar mode there is a binary offset, but the values are still unsigned. Signed-off-by: Lars-Peter Clausen <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
2012-08-16staging:iio:ad7192: Fix setting ACXLars-Peter Clausen1-1/+1
Write to the correct register when setting the ACX bit. Signed-off-by: Lars-Peter Clausen <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
2012-08-16staging:iio:ad7192: Add missing break in switch statementLars-Peter Clausen1-1/+1
Without the break statement we fall right through to the default case and return an error value. Signed-off-by: Lars-Peter Clausen <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
2012-08-16staging:iio:ad7793: Fix internal reference valueLars-Peter Clausen1-1/+1
The internal reference for the ad7793 and similar is 1.17V Signed-off-by: Lars-Peter Clausen <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
2012-08-16staging:iio:ad7793: Follow new IIO naming specLars-Peter Clausen1-2/+3
Make the "in-in_scale_available" attribute follow the new naming spec and rename it to "in_voltage-voltage_scale_available". Signed-off-by: Lars-Peter Clausen <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
2012-08-16staging:iio:ad7793: Fix temperature scale and offsetLars-Peter Clausen1-11/+18
The temperature channel uses the internal 1.17V reference with 0.81 mv/C. The reported temperature is in Kevlin, so we need to add the Kelvin to Celcius offset when reporting the offset for the temperature channel. Signed-off-by: Lars-Peter Clausen <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
2012-08-16staging:iio:ad7793: Report channel offsetLars-Peter Clausen1-13/+26
In bipolar mode there is a a binary offset of 2**(N-1) (with N being the number of bits) on the reported value. Currently this value is subtracted when doing a manual read. While this works for manual channel readings it does not work for buffered mode. So report the offset in the channels offset property, which will work in both modes. Signed-off-by: Lars-Peter Clausen <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
2012-08-16staging:iio:ad7793: Mark channels as unsignedLars-Peter Clausen1-12/+12
The values reported by the AD7793 are unsigned. In uniploar mode: 0x000000 is zeroscale 0xffffff is fullscale In bipolar mode: 0x000000 is negative fullscale 0x800000 is zeroscale 0xffffff is positive fullscale In bipolar mode there is a binary offset, but the values are still unsigned. Signed-off-by: Lars-Peter Clausen <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
2012-08-16staging:iio:ad7793: Add missing break in switch statementLars-Peter Clausen1-1/+1
Without the break statement we fall right through to the default case and return an error value. Signed-off-by: Lars-Peter Clausen <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
2012-08-16iio/adjd_s311: Fix potential memory leak in adjd_s311_update_scan_mode()Alexey Khoroshilov1-3/+4
Do not leak memory by updating pointer with potentially NULL realloc return value. There is no need to preserve data in the buffer, so replace krealloc() by kfree()-kmalloc() pair. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <[email protected]> Acked-by: Peter Meerwald <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
2012-08-16iio: frequency: ADF4350: Fix potential reference div factor overflow.Michael Hennerich2-9/+17
With small channel spacing values and high reference frequencies it is possible to exceed the range of the 10-bit counter. Workaround by checking the range and widening some constrains. We don't use the REG1_PHASE value in this case the datasheet recommends to set it to 1 if not used. Signed-off-by: Michael Hennerich <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>