lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ed138cdb-8a20-4c84-95f4-6137e5803e36@CO9EHSMHS013.ehs.local>
Date:	Mon, 17 Jun 2013 11:22:50 -0700
From:	Sören Brinkmann <soren.brinkmann@...inx.com>
To:	Stephen Rothwell <sfr@...b.auug.org.au>
CC:	Olof Johansson <olof@...om.net>, Arnd Bergmann <arnd@...db.de>,
	<linux-arm-kernel@...ts.infradead.org>,
	<linux-next@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
	Michal Simek <michal.simek@...inx.com>,
	Jingoo Han <jg1.han@...sung.com>, Greg KH <greg@...ah.com>
Subject: Re: linux-next: manual merge of the arm-soc tree with the tty tree

On Mon, Jun 17, 2013 at 04:48:41PM +1000, Stephen Rothwell wrote:
> Hi all,
> 
> Today's linux-next merge of the arm-soc tree got a conflict in
> drivers/tty/serial/xilinx_uartps.c between commit 696faedd616e ("serial:
> use platform_{get,set}_drvdata()") from the tty tree and commit
> 30e1e28598c2 ("arm: zynq: Migrate platform to clock controller") from the
> arm-soc tree.
> 
> I fixed it up (see below) and can carry the fix as necessary (no action
> is required).
> 
> -- 
> Cheers,
> Stephen Rothwell                    sfr@...b.auug.org.au
> 
> diff --cc drivers/tty/serial/xilinx_uartps.c
> index 6c91745,a4a3028..0000000
> --- a/drivers/tty/serial/xilinx_uartps.c
> +++ b/drivers/tty/serial/xilinx_uartps.c
> @@@ -972,14 -1004,15 +1004,14 @@@ static int xuartps_probe(struct platfor
>   		port->mapbase = res->start;
>   		port->irq = res2->start;
>   		port->dev = &pdev->dev;
> - 		port->uartclk = clk_get_rate(clk);
> - 		port->private_data = clk;
> + 		port->uartclk = clk_get_rate(xuartps_data->refclk);
> + 		port->private_data = xuartps_data;
>  -		dev_set_drvdata(&pdev->dev, port);
>  +		platform_set_drvdata(pdev, port);
>   		rc = uart_add_one_port(&xuartps_uart_driver, port);
>   		if (rc) {
>   			dev_err(&pdev->dev,
>   				"uart_add_one_port() failed; err=%i\n", rc);
> - 			return rc;
>  -			dev_set_drvdata(&pdev->dev, NULL);
> + 			goto err_out_clk_disable;
>   		}
>   		return 0;
>   	}
> @@@ -993,14 -1039,19 +1038,18 @@@ err_out_free
>    **/
>   static int xuartps_remove(struct platform_device *pdev)
>   {
>  -	struct uart_port *port = dev_get_drvdata(&pdev->dev);
>  +	struct uart_port *port = platform_get_drvdata(pdev);
> - 	struct clk *clk = port->private_data;
> + 	struct xuartps *xuartps_data = port->private_data;
>   	int rc;
>   
>   	/* Remove the xuartps port from the serial core */
>   	rc = uart_remove_one_port(&xuartps_uart_driver, port);
>  -	dev_set_drvdata(&pdev->dev, NULL);
>   	port->mapbase = 0;
> - 	clk_disable_unprepare(clk);
> + 	clk_disable_unprepare(xuartps_data->refclk);
> + 	clk_disable_unprepare(xuartps_data->aperclk);
> + 	clk_put(xuartps_data->refclk);
> + 	clk_put(xuartps_data->aperclk);
> + 	kfree(xuartps_data);
>   	return rc;
>   }
Looks correct and boots fine on Zynq. Thanks.

	Sören


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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ