Pointer style cleanup; Variable consolidation
This commit is contained in:
@@ -311,14 +311,13 @@ static void
|
|||||||
gpio_lock_i2c(void* cookie, bool lock)
|
gpio_lock_i2c(void* cookie, bool lock)
|
||||||
{
|
{
|
||||||
gpio_info* info = (gpio_info*)cookie;
|
gpio_info* info = (gpio_info*)cookie;
|
||||||
radeon_shared_info &sinfo = *gInfo->shared_info;
|
|
||||||
|
|
||||||
uint32 buffer = 0;
|
uint32 buffer = 0;
|
||||||
|
|
||||||
if (lock == true) {
|
if (lock == true) {
|
||||||
// hw_capable and > DCE3
|
// hw_capable and > DCE3
|
||||||
if (info->hw_capable == true
|
if (info->hw_capable == true
|
||||||
&& sinfo.dceMajor >= 3) {
|
&& gInfo->shared_info->dceMajor >= 3) {
|
||||||
// Switch GPIO pads to ddc mode
|
// Switch GPIO pads to ddc mode
|
||||||
buffer = Read32(OUT, info->mask_scl_reg);
|
buffer = Read32(OUT, info->mask_scl_reg);
|
||||||
buffer &= ~(1 << 16);
|
buffer &= ~(1 << 16);
|
||||||
@@ -369,8 +368,8 @@ gpio_get_i2c_bit(void* cookie, int* _clock, int* _data)
|
|||||||
uint32 sda = Read32(OUT, info->y_sda_reg)
|
uint32 sda = Read32(OUT, info->y_sda_reg)
|
||||||
& info->y_sda_mask;
|
& info->y_sda_mask;
|
||||||
|
|
||||||
*_clock = (scl != 0);
|
*_clock = scl != 0;
|
||||||
*_data = (sda != 0);
|
*_data = sda != 0;
|
||||||
|
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user