Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5cb95fae authored by Nava kishore Manne's avatar Nava kishore Manne Committed by Greg Kroah-Hartman
Browse files

char: xilinx_hwicap: Fix warnings in the driver



This patch fixes the below warning
        --> Use #include <linux/io.h> instead of <asm/io.h>
        --> Use #include <linux/uaccess.h> instead of <asm/uaccess.h>
        --> please, no space before tabs
        --> Block comments use a trailing */ on a separate line
        --> Possible unnecessary 'out of memory' message
        --> Block comments use * on subsequent lines
        --> Block comments use a trailing */ on a separate line
        --> braces {} are not necessary for any arm of this statement
        --> DT compatible string "xlnx,opb-hwicap-1.00.b"
	    appears un-documented
        --> DT compatible string "xlnx,xps-hwicap-1.00.a"
            appears un-documented

Signed-off-by: default avatarNava kishore Manne <navam@xilinx.com>
Signed-off-by: default avatarMichal Simek <michal.simek@xilinx.com>
Acked-by: default avatarRob Herring <robh@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ef2b56df
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -281,6 +281,8 @@
                      capabilities of the underlying ICAP hardware
                      differ between different families.  May be
                      'virtex2p', 'virtex4', or 'virtex5'.
		- compatible : should contain "xlnx,xps-hwicap-1.00.a" or
				"xlnx,opb-hwicap-1.00.b".

      vi) Xilinx Uart 16550

+17 −18
Original line number Diff line number Diff line
@@ -86,8 +86,7 @@
#include <linux/cdev.h>
#include <linux/platform_device.h>
#include <linux/slab.h>

#include <asm/io.h>
#include <linux/io.h>
#include <linux/uaccess.h>

#ifdef CONFIG_OF
@@ -324,7 +323,8 @@ static int hwicap_initialize_hwicap(struct hwicap_drvdata *drvdata)
	dev_dbg(drvdata->dev, "initializing\n");

	/* Abort any current transaction, to make sure we have the
	 * ICAP in a good state. */
	 * ICAP in a good state.
	 */
	dev_dbg(drvdata->dev, "Reset...\n");
	drvdata->config->reset(drvdata);

@@ -636,7 +636,6 @@ static int hwicap_setup(struct device *dev, int id,

	drvdata = kzalloc(sizeof(struct hwicap_drvdata), GFP_KERNEL);
	if (!drvdata) {
		dev_err(dev, "Couldn't allocate device private record\n");
		retval = -ENOMEM;
		goto failed0;
	}
@@ -763,21 +762,21 @@ static int hwicap_of_probe(struct platform_device *op,
	id = of_get_property(op->dev.of_node, "port-number", NULL);

	/* It's most likely that we're using V4, if the family is not
	   specified */
	 * specified
	 */
	regs = &v4_config_registers;
	family = of_get_property(op->dev.of_node, "xlnx,family", NULL);

	if (family) {
		if (!strcmp(family, "virtex2p")) {
		if (!strcmp(family, "virtex2p"))
			regs = &v2_config_registers;
		} else if (!strcmp(family, "virtex4")) {
		else if (!strcmp(family, "virtex4"))
			regs = &v4_config_registers;
		} else if (!strcmp(family, "virtex5")) {
		else if (!strcmp(family, "virtex5"))
			regs = &v5_config_registers;
		} else if (!strcmp(family, "virtex6")) {
		else if (!strcmp(family, "virtex6"))
			regs = &v6_config_registers;
	}
	}
	return hwicap_setup(&op->dev, id ? *id : -1, &res, config,
			regs);
}
@@ -806,21 +805,21 @@ static int hwicap_drv_probe(struct platform_device *pdev)
		return -ENODEV;

	/* It's most likely that we're using V4, if the family is not
	   specified */
	 * specified
	 */
	regs = &v4_config_registers;
	family = pdev->dev.platform_data;

	if (family) {
		if (!strcmp(family, "virtex2p")) {
		if (!strcmp(family, "virtex2p"))
			regs = &v2_config_registers;
		} else if (!strcmp(family, "virtex4")) {
		else if (!strcmp(family, "virtex4"))
			regs = &v4_config_registers;
		} else if (!strcmp(family, "virtex5")) {
		else if (!strcmp(family, "virtex5"))
			regs = &v5_config_registers;
		} else if (!strcmp(family, "virtex6")) {
		else if (!strcmp(family, "virtex6"))
			regs = &v6_config_registers;
	}
	}

	return hwicap_setup(&pdev->dev, pdev->id, res,
			&buffer_icap_config, regs);
+4 −2
Original line number Diff line number Diff line
@@ -62,11 +62,13 @@ struct hwicap_drvdata {

struct hwicap_driver_config {
	/* Read configuration data given by size into the data buffer.
	   Return 0 if successful. */
	 * Return 0 if successful.
	 */
	int (*get_configuration)(struct hwicap_drvdata *drvdata, u32 *data,
			u32 size);
	/* Write configuration data given by size from the data buffer.
	   Return 0 if successful. */
	 * Return 0 if successful.
	 */
	int (*set_configuration)(struct hwicap_drvdata *drvdata, u32 *data,
			u32 size);
	/* Get the status register, bit pattern given by: