Skip to content

Commit

Permalink
Documentation:sunxi:disp_version: handle missing versioning
Browse files Browse the repository at this point in the history
Signed-off-by: Luc Verhaegen <[email protected]>
  • Loading branch information
libv authored and amery committed Nov 2, 2012
1 parent c042b66 commit 75d3c43
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions Documentation/sunxi/disp/disp_version.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,16 @@ main(int argc, char *argv[])

tmp = SUNXI_DISP_VERSION;
ret = ioctl(fd, DISP_CMD_VERSION, &tmp);
if (ret < 0) {
if (ret == -1) {
printf("Warning: kernel sunxi disp driver does not support "
"versioning.\n");
} else if (ret < 0) {
fprintf(stderr, "Error: ioctl(VERSION) failed: %s\n",
strerror(-ret));
return ret;
}

printf("disp kernel module version is %d.%d\n",
ret >> 16, ret & 0xFFFF);
} else
printf("sunxi disp kernel module version is %d.%d\n",
ret >> 16, ret & 0xFFFF);

tmp = 0;
ret = ioctl(fd, DISP_CMD_SCN_GET_WIDTH, &tmp);
Expand Down

0 comments on commit 75d3c43

Please sign in to comment.