summaryrefslogtreecommitdiffstats
path: root/drivers/nfc
AgeCommit message (Collapse)Author
2014-12-18Merge tag 'pm+acpi-3.19-rc1-2' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull more ACPI and power management updates from Rafael Wysocki: "These are regression fixes (leds-gpio, ACPI backlight driver, operating performance points library, ACPI device enumeration messages, cpupower tool), other bug fixes (ACPI EC driver, ACPI device PM), some cleanups in the operating performance points (OPP) framework, continuation of CONFIG_PM_RUNTIME elimination, a couple of minor intel_pstate driver changes, a new MAINTAINERS entry for it and an ACPI fan driver change needed for better support of thermal management in user space. Specifics: - Fix a regression in leds-gpio introduced by a recent commit that inadvertently changed the name of one of the properties used by the driver (Fabio Estevam). - Fix a regression in the ACPI backlight driver introduced by a recent fix that missed one special case that had to be taken into account (Aaron Lu). - Drop the level of some new kernel messages from the ACPI core introduced by a recent commit to KERN_DEBUG which they should have used from the start and drop some other unuseful KERN_ERR messages printed by ACPI (Rafael J Wysocki). - Revert an incorrect commit modifying the cpupower tool (Prarit Bhargava). - Fix two regressions introduced by recent commits in the OPP library and clean up some existing minor issues in that code (Viresh Kumar). - Continue to replace CONFIG_PM_RUNTIME with CONFIG_PM throughout the tree (or drop it where that can be done) in order to make it possible to eliminate CONFIG_PM_RUNTIME (Rafael J Wysocki, Ulf Hansson, Ludovic Desroches). There will be one more "CONFIG_PM_RUNTIME removal" batch after this one, because some new uses of it have been introduced during the current merge window, but that should be sufficient to finally get rid of it. - Make the ACPI EC driver more robust against race conditions related to GPE handler installation failures (Lv Zheng). - Prevent the ACPI device PM core code from attempting to disable GPEs that it has not enabled which confuses ACPICA and makes it report errors unnecessarily (Rafael J Wysocki). - Add a "force" command line switch to the intel_pstate driver to make it possible to override the blacklisting of some systems in that driver if needed (Ethan Zhao). - Improve intel_pstate code documentation and add a MAINTAINERS entry for it (Kristen Carlson Accardi). - Make the ACPI fan driver create cooling device interfaces witn names that reflect the IDs of the ACPI device objects they are associated with, except for "generic" ACPI fans (PNP ID "PNP0C0B"). That's necessary for user space thermal management tools to be able to connect the fans with the parts of the system they are supposed to be cooling properly. From Srinivas Pandruvada" * tag 'pm+acpi-3.19-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (32 commits) MAINTAINERS: add entry for intel_pstate ACPI / video: update the skip case for acpi_video_device_in_dod() power / PM: Eliminate CONFIG_PM_RUNTIME NFC / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM SCSI / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM ACPI / EC: Fix unexpected ec_remove_handlers() invocations Revert "tools: cpupower: fix return checks for sysfs_get_idlestate_count()" tracing / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM x86 / PM: Replace CONFIG_PM_RUNTIME in io_apic.c PM: Remove the SET_PM_RUNTIME_PM_OPS() macro mmc: atmel-mci: use SET_RUNTIME_PM_OPS() macro PM / Kconfig: Replace PM_RUNTIME with PM in dependencies ARM / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM sound / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM phy / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM video / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM tty / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM spi: Replace CONFIG_PM_RUNTIME with CONFIG_PM ACPI / PM: Do not disable wakeup GPEs that have not been enabled ACPI / utils: Drop error messages from acpi_evaluate_reference() ...
2014-12-15NFC / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PMRafael J. Wysocki
After commit b2b49ccbdd54 (PM: Kconfig: Set PM_RUNTIME if PM_SLEEP is selected) PM_RUNTIME is always set if PM is set, so #ifdef blocks depending on CONFIG_PM_RUNTIME may now be changed to depend on CONFIG_PM. Replace CONFIG_PM_RUNTIME with CONFIG_PM in drivers/nfc/trf7970a.c. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2014-12-14Merge tag 'driver-core-3.19-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core update from Greg KH: "Here's the set of driver core patches for 3.19-rc1. They are dominated by the removal of the .owner field in platform drivers. They touch a lot of files, but they are "simple" changes, just removing a line in a structure. Other than that, a few minor driver core and debugfs changes. There are some ath9k patches coming in through this tree that have been acked by the wireless maintainers as they relied on the debugfs changes. Everything has been in linux-next for a while" * tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (324 commits) Revert "ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries" fs: debugfs: add forward declaration for struct device type firmware class: Deletion of an unnecessary check before the function call "vunmap" firmware loader: fix hung task warning dump devcoredump: provide a one-way disable function device: Add dev_<level>_once variants ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries ath: use seq_file api for ath9k debugfs files debugfs: add helper function to create device related seq_file drivers/base: cacheinfo: remove noisy error boot message Revert "core: platform: add warning if driver has no owner" drivers: base: support cpu cache information interface to userspace via sysfs drivers: base: add cpu_device_create to support per-cpu devices topology: replace custom attribute macros with standard DEVICE_ATTR* cpumask: factor out show_cpumap into separate helper function driver core: Fix unbalanced device reference in drivers_probe driver core: fix race with userland in device_add() sysfs/kernfs: make read requests on pre-alloc files use the buffer. sysfs/kernfs: allow attributes to request write buffer be pre-allocated. fs: sysfs: return EGBIG on write if offset is larger than file size ...
2014-12-02NFC: st21nfcb: Fix reported errorChristophe Ricard
Report error returned by devm_gpio_request_one instead of -ENODEV. Reported-by: Dmitry Torokhov <dtor@chromium.org> Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2014-12-02NFC: st21nfca: Report error returned by functions instead of -ENODEVChristophe Ricard
Report error returned by devm_gpio_request_one or st21nfca_hci_platform_init instead of -ENODEV. Reported-by: Dmitry Torokhov <dtor@chromium.org> Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2014-12-02NFC: st21nfcb: Remove useless pr_infoChristophe Ricard
- pr_info in st21nfcb_nci_i2c_disable is not necessary Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2014-12-02NFC: st21nfcb: Improve ndlc commentChristophe Ricard
In ndlc_probe function we initialize timers. They are not started. Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2014-12-02NFC: st21nfca: Rework st21nfca_hci_event_received to route event to relevent ↵Christophe Ricard
gate. As many event with the same id can come from several gates, it will be easier to manage each of them by gate. Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2014-12-02NFC: st21nfcb: Remove gpio_irq field in static and dts configurationChristophe Ricard
- phy->gpio_irq is never done out of the request resources. - irq_of_parse_and_map is already done in the i2c core so client->irq is already set when entering in st21nfcb_hci_i2c_of_request_resources - In case of static platform configuration client->irq can be set directly. - It simplifies the code a bit. Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2014-12-02NFC: st21nfcb: Add of_st21nfcb_i2c_match to MODULE_DEVICE_TABLEChristophe Ricard
When CONFIG_OF is define add of_st21nfcb_i2c_match to MODULE_DEVICE_TABLE Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2014-12-02NFC: st21nfca: Remove gpio_irq field in static and dts configurationChristophe Ricard
- phy->gpio_irq is never done out of the request resources. - irq_of_parse_and_map is already done in the i2c core so client->irq is already set when entering in st21nfca_hci_i2c_of_request_resources - In case of static platform configuration client->irq can be set directly - It simplifies the code a bit. Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2014-12-02NFC: st21nfca: Add of_st21nfca_i2c_match to MODULE_DEVICE_TABLEChristophe Ricard
When CONFIG_OF is define add of_st21nfca_i2c_match to MODULE_DEVICE_TABLE. Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2014-11-28NFC: Don't include linux/unaligned/access_ok.hJohannes Berg
This is a specific implementation, <asm/unaligned.h> is the multiplexer that has the arch-specific knowledge of which of the implementations needs to be used, so include that. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2014-10-20nfc: drop owner assignment from platform_driversWolfram Sang
A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-10-05Merge tag 'master-2014-10-02' of ↵David S. Miller
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next John W. Linville says: ==================== pull request: wireless-next 2014-10-03 Please pull tihs batch of updates intended for the 3.18 stream! For the iwlwifi bits, Emmanuel says: "I have here a few things that depend on the latest mac80211's changes: RRM, TPC, Quiet Period etc... Eyal keeps improving our rate control and we have a new device ID. This last patch should probably have gone to wireless.git, but at that stage, I preferred to send it to -next and CC stable." For (most of) the Atheros bits, Kalle says: "The only new feature is testmode support from me. Ben added a new method to crash the firmware with an assert for debug purposes. As usual, we have lots of smaller fixes from Michal. Matteo fixed a Kconfig dependency with debugfs. I fixed some warnings recently added to checkpatch." For the NFC bits, Samuel says: "We've had major updates for TI and ST Microelectronics drivers, and a few NCI related changes. For TI's trf7970a driver: - Target mode support for trf7970a - Suspend/resume support for trf7970a - DT properties additions to handle different quirks - A bunch of fixes for smartphone IOP related issues For ST Microelectronics' ST21NFCA and ST21NFCB drivers: - ISO15693 support for st21nfcb - checkpatch and sparse related warning fixes - Code cleanups and a few minor fixes Finally, Marvell added ISO15693 support to the NCI stack, together with a couple of NCI fixes." For the Bluetooth bits, Johan says: "This 3.18 pull request replaces the one I did on Monday ("bluetooth-next 2014-09-22", which hasn't been pulled yet). The additions since the last request are: - SCO connection fix for devices not supporting eSCO - Cleanups regarding the SCO establishment logic - Remove unnecessary return value from logging functions - Header compression fix for 6lowpan - Cleanups to the ieee802154/mrf24j40 driver Here's a copy from previous request that this one replaces: ' Here are some more patches for 3.18. They include various fixes to the btusb HCI driver, a fix for LE SMP, as well as adding Jukka to the MAINTAINERS file for generic 6LoWPAN (as requested by Alexander Aring). I've held on to this pull request a bit since we were waiting for a SCO related fix to get sorted out first. However, since the merge window is getting closer I decided not to wait for it. If we do get the fix sorted out there'll probably be a second small pull request later this week. '" And, "Unless 3.17 gets delayed this will probably be our last -next pull request for 3.18. We've got: - New Marvell hardware supportr - Multicast support for 6lowpan - Several of 6lowpan fixes & cleanups - Fix for a (false-positive) lockdep warning in L2CAP - Minor btusb cleanup" On top of all that comes the usual sort of updates to ath5k, ath9k, ath10k, brcmfmac, mwifiex, and wil6210. This time around there are also a number of rtlwifi updates to enable some new hardware and to reconcile the in-kernel drivers with some newer releases of the Realtek vendor drivers. Also of note is some device tree work for the bcma bus. Please let me know if there are problems! ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2014-09-24NFC: st21nfca: Fix potential double kfree_skb errorChristophe Ricard
skb is already freed in st21nfca_tx_work and was freed also in st21nfca_im_send_psl_req. Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2014-09-24NFC: st21nfca: ERR_PTR vs NULL fixChristophe Ricard
"skb" can be NULL here but it can't be an ERR_PTR: - IS_ERR(NULL) return false and skb migth be NULL. - skb cannot be a ERR_PTR as nfc_hci_send_cmd_async it never using such cast. !skb is more appropriate at those places. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2014-09-24NFC: st21nfcb: remove error outputChristophe Ricard
In case we are not able to read out the NDLC/NCI header, we do not consider this as an issue and we will give a later chance. The NDLC layer will handle errors thanks to its internal timers. Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2014-09-24NFC: st21nfcb: Add ISO15693 Reader/Writer supportChristophe Ricard
Add support for ISO/IEC 15693 RF technology and Type 5 tags. Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2014-09-24NFC: nci: Add support for proprietary RF ProtocolsChristophe Ricard
In NFC Forum NCI specification, some RF Protocol values are reserved for proprietary use (from 0x80 to 0xfe). Some CLF vendor may need to use one value within this range for specific technology. Furthermore, some CLF may not becompliant with NFC Froum NCI specification 2.0 and therefore will not support RF Protocol value 0x06 for PROTOCOL_T5T as mention in a draft specification and in a recent push. Adding get_rf_protocol handle to the nci_ops structure will help to set the correct technology to target. Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2014-09-24NFC: st21nfcb: Fix improper ndlc T2 managementChristophe Ricard
T2 was never started when sending a command. Start it when sending a command for the first attempt and stop it once we receive the answer. Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2014-09-24NFC: st21nfcb: Fix improper management of -EREMOTEIO error code.Christophe Ricard
On st21nfcb the irq line might be kept to active state because of other interfaces activity. This may generate i2c read tentative resulting in i2c NACK. This fix will currently let NDLC upper layer to decide when it is relevent to signal to the physical layer when the chip as muted. Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2014-09-24NFC: st21nfca: Fix recursive fault when doing p2p in target mode.Christophe Ricard
This patch fix a previous patch introduce by commit 0a91e8ac240a12ac3a03581deb8cd531788c63d4 It is actually fixing a double free mistake in all st21nfca_tm_* function. We decide to return directly in case of successful execution because skb got already freed. In st21nfca_tm_recv_dep_req it got freed by nfc_tm_data_received. Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2014-09-24NFC: st21nfca: Fix potential skb leaks in NFC-DEP codeChristophe Ricard
After a unsuccessful call to nfc_hci_send_event the skb was not freed and might lead to memory leak. Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2014-09-24NFC: st21nfca: Fix few coding style issueChristophe Ricard
Fix few conding style issue such as useless line return or tab. Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2014-09-24NFC: trf7970a: Unlock mutex before exiting _trf7970a_tg_listen()Mark A. Greer
The recently added _trf7970a_tg_listen() routine has some return paths that don't unlock the mutex that is locked when the routine is entered. Fix this by always unlocking the mutex before returning. Signed-off-by: Mark A. Greer <mgreer@animalcreek.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2014-09-24NFC: trf7970a: Unlock mutex before exiting trf7970a_irq()Mark A. Greer
Recent changes to trf7970a_irq() added a couple return paths that don't unlock the mutex that is locked when the routine is entered. Fix this by ensuring the mutex is always unlocked before returning. Signed-off-by: Mark A. Greer <mgreer@animalcreek.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2014-09-24NFC: trf7970a: Remove unnecessary local variable initializationMark A. Greer
There is no need to initialize the 'ret' variable in trf7970a_resume(). Signed-off-by: Mark A. Greer <mgreer@animalcreek.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2014-09-24NFC: trf7970a: Remove useless local variableMark A. Greer
The trf7970a_suspend() routine always returns zero so don't use a local return variable to hold the return value. This fixes up a smatch warning. Signed-off-by: Mark A. Greer <mgreer@animalcreek.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2014-09-08NFC: st21nfcb: Remove useless headersChristophe Ricard
Remove some headers as they are: - not relevent for st21nfcb. - called multiple times for no reason: example st21nfcb.h already include ndlc.h. Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2014-09-08NFC: st21nfca: fix "WARNING: else is not generally useful after a break or ↵Christophe Ricard
return" scripts/checkpatch.pl -f drivers/nfc/st21nfca.c is throwing the following: WARNING: else is not generally useful after a break or return #866: FILE: drivers/nfc/st21nfca/st21nfca.c:866: + return 0; + } else { Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2014-09-08NFC: st21nfca: Clean up macros alignmentChristophe Ricard
Align every macros on the same column. Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2014-09-08NFC: st21nfca: Clean up st21nfca.h macrosChristophe Ricard
Clean up st21nfca.h macros and move the one only used in st21nfca.c. Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2014-09-08NFC: st21nfcb: Fix logic when running into i2c read retryChristophe Ricard
When retrying to read the NCI header, the CLF might not be available the first time. However it may not be successful the second time and this may cause an error in the function. Enforce the retrieve data length is as expected. Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2014-09-08NFC: st21nfca: Add condition to make sure atr_req->length is valid.Christophe Ricard
gb_len in st21nfca_tm_send_atr_res can be negative. Not checking for that could lead to a potential kernel oops. We now make sure that atr_req->length > sizeof(struct st21nfca_atr_req) to avoid such situation. Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2014-09-08NFC: st21nfca: Remove useless IS_ERR(skb) conditionsChristophe Ricard
skb is already verified to be not null from the below hci layer. Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2014-09-08NFC: st21nfca: Remove useless err == 0 conditionChristophe Ricard
On top of st21nfca_im_recv_atr_res_cb and st21nfca_im_recv_dep_res_cb a condition if (err != 0) is present. Because err is never modified in the code err will always be 0 at the end. The condition can be removed. Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2014-09-08NFC: st21nfca: Change nfcid3 generationChristophe Ricard
nfcid3 is based on sensf_res value. target->sensf is never NULL as it is a table. Check the sensf_res_len instead to make sure sensf_res is set or not. Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2014-09-07NFC: st21nfca: Remove useless new line in nfc_err callChristophe Ricard
Remove a useless new line in nfc_err call. Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2014-09-07NFC: st21nfca: Fix logic when setting session_idChristophe Ricard
If dev_num >= ST21NFCA_NUM_DEVICES, the driver was returning an incorrect success return code. Once dev_num is set, it was not stated as busy. Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2014-09-07NFC: st21nfcb: Remove inappropriate kfree on a previously devm_kzalloc pointerChristophe Ricard
In case of an error during driver probe, info pointer was freed with kfree. No need to free anything when using devm_kzalloc. Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2014-09-07NFC: st21nfcb: Remove useless new line in nfc_err callChristophe Ricard
Remove a uselss new line in nfc_err call. Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2014-09-07NFC: st21nfcb: Remove double assignment of .owner in struct device_driverChristophe Ricard
The .owner member of struct device_driver is assigned THIS_MODULE twice. Introduced by: commit 35630df68d6030daf12dde12ed07bbe26324e6ac NFC: st21nfcb: Add driver for STMicroelectronics ST21NFCB NFC chip Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2014-09-07NFC: st21nfcb: Convert to use devm_gpio_request_oneChristophe Ricard
Simplify the code a bit as mention by Axel Lin in a previous patch for st21nfca. Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2014-09-07NFC: st21nfcb: Fix scripts/checkpatch.pl error "code indent should use tabs ↵Christophe Ricard
where possible" Fixing scripts/checkpatch.pl error "code indent should use tabs where possible" in: - i2c.c in st21nfcb_nci_irq_thread_fn function. Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2014-09-07NFC: st21nfca: Fix scripts/checkpatch.pl warnings "Missing a blank line ↵Christophe Ricard
after declarations" Fixing scripts/checkpatch.pl warning "Missing a blank line after declarations" in: - st21nfca.c: - check_presence after fwi variable declaration. - get_frame_size after len variable declaration. - st21nfca_hci_i2c_repack after "i, j, r, size" variable declaration. - st21nfca_dep.c st21nfca_tx_work after skb pointer declaration. Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2014-09-07NFC: st21nfca: Fix sparse: cast to restricted __be32Christophe Ricard
Fixing "sparse: cast to restricted __be32" message when building with make C=1 CF=-D__CHECK_ENDIAN__ Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2014-09-07NFC: st21nfca: Convert to use devm_gpio_request_oneAxel Lin
This simplifies the code a bit. Acked-by: Christophe RICARD <christophe-h.ricard@st.com> Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2014-09-07NFC: st21nfca: Remove double assignment of .owner in struct device_driverEmil Goode
The .owner member of struct device_driver is assigned THIS_MODULE twice. Introduced by: commit c44cb2edd01ca31471d9385f0895891b006ab904 ("NFC: dts: st21nfca: Add device-tree (Open Firmware) support to st21nfca") Acked-by: Christophe RICARD <christophe-h.ricard@st.com> Signed-off-by: Emil Goode <emilgoode@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2014-09-07NFC: st21nfca: Fix potential depmod dependency cycleChristophe Ricard
In the previous makefile 2 modules were generated for CONFIG_NFC_ST21NFCA (st21nfca.ko and st21nfca_dep.ko). Merge both of them into st21nfca_hci.ko and fix a potential depmod dependency cycle, similar to the one we saw on st21nfcb: depmod: WARNING: found 6 modules in dependency cycles! depmod: WARNING: /lib/modules/3.17.0-rc3-00002-g7505cea/kernel/drivers/nfc/st21nfcb/st21nfcb.ko in dependency cycle! depmod: WARNING: /lib/modules/3.17.0-rc3-00002-g7505cea/kernel/drivers/nfc/st21nfcb/ndlc.ko in dependency cycle! depmod: WARNING: /lib/modules/3.17.0-rc3-00002-g7505cea/kernel/net/rfkill/rfkill.ko in dependency cycle! depmod: WARNING: /lib/modules/3.17.0-rc3-00002-g7505cea/kernel/net/nfc/nfc.ko in dependency cycle! depmod: WARNING: /lib/modules/3.17.0-rc3-00002-g7505cea/kernel/net/nfc/nci/nci.ko in dependency cycle! depmod: WARNING: /lib/modules/3.17.0-rc3-00002-g7505cea/kernel/lib/crc-ccitt.ko in dependency cycle! ./scripts/depmod.sh: line 57: 23387 Segmentation fault (core dumped) "$DEPMOD" "$@" "$KERNELRELEASE" $SYMBOL_PREFIX make: *** [_modinst_post] Error 139 Reported-by: Daniel Wagner <wagi@monom.org> Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>