Using Python, create a function that calculates the objective function of a linear equation.
ax + by = c

a = 3, b = 5, c = 7
def linear_eq(a, b, c):
    return a*x + b*y - c

# For example:
result = linear_eq(3, 5, 7)
print(result)