Revision 87ecb68b hw/max7310.c

b/hw/max7310.c
7 7
 * This file is licensed under GNU GPL.
8 8
 */
9 9

  
10
#include "vl.h"
10
#include "hw.h"
11
#include "i2c.h"
11 12

  
12 13
struct max7310_s {
13 14
    i2c_slave i2c;
......
182 183
{
183 184
    struct max7310_s *s = (struct max7310_s *) opaque;
184 185
    if (line >= sizeof(s->handler) / sizeof(*s->handler) || line  < 0)
185
        cpu_abort(cpu_single_env, "bad GPIO line");
186
        hw_error("bad GPIO line");
186 187

  
187 188
    if (level)
188 189
        s->level |= s->direction & (1 << line);
......
220 221
{
221 222
    struct max7310_s *s = (struct max7310_s *) i2c;
222 223
    if (line >= sizeof(s->handler) / sizeof(*s->handler) || line  < 0)
223
        cpu_abort(cpu_single_env, "bad GPIO line");
224
        hw_error("bad GPIO line");
224 225

  
225 226
    s->handler[line] = handler;
226 227
}

Also available in: Unified diff