[xf86-video-cirrus] Declare an I2C bus name string as a static type for alp_i2c.c

Submitted by Kevin Brace on July 18, 2019, 2:55 a.m.

Details

Message ID 20190718025516.1774-1-kevinbrace@gmx.com
State New
Headers show
Series "Declare an I2C bus name string as a static type for alp_i2c.c" ( rev: 1 ) in X.org

Not browsing as part of any series.

Commit Message

Kevin Brace July 18, 2019, 2:55 a.m.
Signed-off-by: Kevin Brace <kevinbrace@gmx.com>
---
 src/alp_i2c.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

--
2.17.1

Patch hide | download patch | download mbox

diff --git a/src/alp_i2c.c b/src/alp_i2c.c
index 9341543..b52f2c8 100644
--- a/src/alp_i2c.c
+++ b/src/alp_i2c.c
@@ -16,6 +16,11 @@ 
 #define _ALP_PRIVATE_
 #include "alp.h"

+
+static char strI2CBus1[]	= "I2C bus 1";
+static char strI2CBus2[]	= "I2C bus 2";
+
+
 /*
  * Switch between internal I2C bus and external (DDC) bus.
  * There is one I2C port controlled bu SR08 and the programmable
@@ -99,7 +104,7 @@  AlpI2CInit(ScrnInfoPtr pScrn)

 	pCir->I2CPtr1 = I2CPtr;

-	I2CPtr->BusName    = "I2C bus 1";
+	I2CPtr->BusName    = strI2CBus1;
 	I2CPtr->scrnIndex  = pScrn->scrnIndex;
 	I2CPtr->I2CPutBits = AlpI2CPutBits;
 	I2CPtr->I2CGetBits = AlpI2CGetBits;
@@ -113,7 +118,7 @@  AlpI2CInit(ScrnInfoPtr pScrn)

 	pCir->I2CPtr2 = I2CPtr;

-	I2CPtr->BusName    = "I2C bus 2";
+	I2CPtr->BusName    = strI2CBus2;
 	I2CPtr->scrnIndex  = pScrn->scrnIndex;
 	I2CPtr->I2CPutBits = AlpI2CPutBits;
 	I2CPtr->I2CGetBits = AlpI2CGetBits;

Comments

HI,
thx for your patch,
would you like to explain why ?
what problem do you try to solve ?


re,
 wh

Am 18.07.2019 04:55, schrieb Kevin Brace:
> Signed-off-by: Kevin Brace <kevinbrace@gmx.com>
> ---
>  src/alp_i2c.c | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/src/alp_i2c.c b/src/alp_i2c.c
> index 9341543..b52f2c8 100644
> --- a/src/alp_i2c.c
> +++ b/src/alp_i2c.c
> @@ -16,6 +16,11 @@
>  #define _ALP_PRIVATE_
>  #include "alp.h"
> 
> +
> +static char strI2CBus1[]	= "I2C bus 1";
> +static char strI2CBus2[]	= "I2C bus 2";
> +
> +
>  /*
>   * Switch between internal I2C bus and external (DDC) bus.
>   * There is one I2C port controlled bu SR08 and the programmable
> @@ -99,7 +104,7 @@ AlpI2CInit(ScrnInfoPtr pScrn)
> 
>  	pCir->I2CPtr1 = I2CPtr;
> 
> -	I2CPtr->BusName    = "I2C bus 1";
> +	I2CPtr->BusName    = strI2CBus1;
>  	I2CPtr->scrnIndex  = pScrn->scrnIndex;
>  	I2CPtr->I2CPutBits = AlpI2CPutBits;
>  	I2CPtr->I2CGetBits = AlpI2CGetBits;
> @@ -113,7 +118,7 @@ AlpI2CInit(ScrnInfoPtr pScrn)
> 
>  	pCir->I2CPtr2 = I2CPtr;
> 
> -	I2CPtr->BusName    = "I2C bus 2";
> +	I2CPtr->BusName    = strI2CBus2;
>  	I2CPtr->scrnIndex  = pScrn->scrnIndex;
>  	I2CPtr->I2CPutBits = AlpI2CPutBits;
>  	I2CPtr->I2CGetBits = AlpI2CGetBits;
> --
> 2.17.1
> 
> _______________________________________________
> xorg-devel@lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: https://lists.x.org/mailman/listinfo/xorg-devel