HMC5883 driver: stack size adjustments of start handler and start return review / comments

This commit is contained in:
Lorenz Meier 2014-07-16 07:51:24 +02:00
parent 619433d369
commit f89573a6ed
2 changed files with 8 additions and 6 deletions

View File

@ -867,7 +867,7 @@ HMC5883::collect()
struct {
int16_t x, y, z;
} report;
int ret = -EIO;
int ret;
uint8_t cmd;
uint8_t check_counter;
@ -1157,7 +1157,7 @@ int HMC5883::calibrate(struct file *filp, unsigned enable)
out:
if (OK != ioctl(filp, MAGIOCSSCALE, (long unsigned int)&mscale_previous)) {
warn("WARNING: failed to set new scale / offsets for mag");
warn("failed to set new scale / offsets for mag");
}
/* set back to normal mode */
@ -1353,6 +1353,9 @@ void usage();
/**
* Start the driver.
*
* This function call only returns once the driver
* is either successfully up and running or failed to start.
*/
void
start(int bus, enum Rotation rotation)
@ -1443,7 +1446,7 @@ test(int bus)
int fd = open(path, O_RDONLY);
if (fd < 0)
err(1, "%s open failed (try 'hmc5883 start' if the driver is not running", path);
err(1, "%s open failed (try 'hmc5883 start')", path);
/* do a simple demand read */
sz = read(fd, &report, sizeof(report));

View File

@ -37,7 +37,6 @@
MODULE_COMMAND = hmc5883
# XXX seems excessive, check if 2048 is sufficient
MODULE_STACKSIZE = 4096
SRCS = hmc5883.cpp
MODULE_STACKSIZE = 1200